Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,10 +14,10 @@ def classify_image(img):
|
|
| 14 |
pred,idx,probs = learn.predict(img)
|
| 15 |
return dict(zip(categories, map(float,probs)))
|
| 16 |
|
| 17 |
-
image = gr.input.Image(shape = (192,192))
|
| 18 |
-
label = gr.outputs.Label()
|
| 19 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
| 20 |
|
| 21 |
|
| 22 |
-
intf = gr.Interface(fn= classify_image, inputs=
|
| 23 |
intf.launch(inline = False)
|
|
|
|
| 14 |
pred,idx,probs = learn.predict(img)
|
| 15 |
return dict(zip(categories, map(float,probs)))
|
| 16 |
|
| 17 |
+
#image = gr.input.Image(shape = (192,192))
|
| 18 |
+
#label = gr.outputs.Label()
|
| 19 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
| 20 |
|
| 21 |
|
| 22 |
+
intf = gr.Interface(fn= classify_image, inputs= gr.Image(type=“pil”) , outputs= gr.Label(), examples = examples)
|
| 23 |
intf.launch(inline = False)
|