Spaces:
Runtime error
Runtime error
Minor change
Browse files
app.py
CHANGED
|
@@ -13,5 +13,9 @@ def predict(img):
|
|
| 13 |
pred,pred_idx,probs = learn.predict(img)
|
| 14 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
iface.launch()
|
|
|
|
| 13 |
pred,pred_idx,probs = learn.predict(img)
|
| 14 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 15 |
|
| 16 |
+
|
| 17 |
+
iface = gr.Interface(fn=predict,
|
| 18 |
+
inputs=gr.Image(shape=(512, 512)),
|
| 19 |
+
outputs=gr.Label(num_top_classes=3),
|
| 20 |
+
interpretation='default')
|
| 21 |
iface.launch()
|