Spaces:
Sleeping
Sleeping
Muhammad Abdullahi
commited on
Commit
·
2ec2784
1
Parent(s):
7499d49
changed how the image is uploaded
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ def classify_images(img):
|
|
10 |
return dict(zip(categories, map(float, probs)))
|
11 |
# return {learner.dls.vocab[i]: float(probs[i]) for i in range(len(learner.dls.vocab))}
|
12 |
|
13 |
-
image = gr.
|
14 |
-
label = gr.outputs.Label()
|
15 |
examples = ['kentish.png', 'white-faced.png']
|
16 |
|
17 |
-
intf = gr.Interface(fn=classify_images, inputs=image, outputs=label, examples=examples)
|
18 |
intf.launch(inline=False)
|
19 |
# intface = gr.Interface(fn=classify_images, inputs=gr.inputs.Image(type='pil'),
|
20 |
# outputs=gr.outputs.Label(num_top_classes=2),
|
|
|
10 |
return dict(zip(categories, map(float, probs)))
|
11 |
# return {learner.dls.vocab[i]: float(probs[i]) for i in range(len(learner.dls.vocab))}
|
12 |
|
13 |
+
image = gr.Image(shape=(192,192))
|
14 |
+
# label = gr.outputs.Label()
|
15 |
examples = ['kentish.png', 'white-faced.png']
|
16 |
|
17 |
+
intf = gr.Interface(fn=classify_images, inputs=image, outputs='label', examples=examples)
|
18 |
intf.launch(inline=False)
|
19 |
# intface = gr.Interface(fn=classify_images, inputs=gr.inputs.Image(type='pil'),
|
20 |
# outputs=gr.outputs.Label(num_top_classes=2),
|