Spaces:
Runtime error
Runtime error
Fix image shape to pil format
Browse files
app.py
CHANGED
|
@@ -14,8 +14,7 @@ def predict(img):
|
|
| 14 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 15 |
|
| 16 |
|
| 17 |
-
|
| 18 |
-
inputs=gr.Image(
|
| 19 |
outputs=gr.Label(num_top_classes=3),
|
| 20 |
-
interpretation='default')
|
| 21 |
-
iface.launch()
|
|
|
|
| 14 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 15 |
|
| 16 |
|
| 17 |
+
gr.Interface(fn=predict,
|
| 18 |
+
inputs=gr.Image(type="pil"),
|
| 19 |
outputs=gr.Label(num_top_classes=3),
|
| 20 |
+
interpretation='default').launch()
|
|
|