Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,11 +18,11 @@ def classify_image(img):
|
|
| 18 |
return dict(zip(categories, map(float,probs)))
|
| 19 |
|
| 20 |
# Cell
|
| 21 |
-
image = gr.inputs.Image(shape=(192, 192))
|
| 22 |
-
label = gr.outputs.Label()
|
| 23 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
| 24 |
|
| 25 |
-
intf = gr.Interface(fn=classify_image,inputs=gr.Image(type=
|
| 26 |
|
| 27 |
# intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 28 |
intf.launch(inline=False)
|
|
|
|
| 18 |
return dict(zip(categories, map(float,probs)))
|
| 19 |
|
| 20 |
# Cell
|
| 21 |
+
# image = gr.inputs.Image(shape=(192, 192))
|
| 22 |
+
# label = gr.outputs.Label()
|
| 23 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
| 24 |
|
| 25 |
+
intf = gr.Interface(fn=classify_image,inputs=gr.Image(type='pil'),outputs=gr.Label(),examples=examples)
|
| 26 |
|
| 27 |
# intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 28 |
intf.launch(inline=False)
|