Spaces:
Sleeping
Sleeping
resolved gradio runtime errors with inputs and labels.
Browse files
app.py
CHANGED
|
@@ -12,9 +12,6 @@ def classify_image(img):
|
|
| 12 |
pred, idx, probs = learn.predict(img)
|
| 13 |
return dict(zip(categories, map(float, probs)))
|
| 14 |
|
| 15 |
-
image = gr.inputs.Image(shape=(200, 200))
|
| 16 |
-
label = gr.outputs.label()
|
| 17 |
|
| 18 |
-
|
| 19 |
-
iface
|
| 20 |
-
iface.launch(inline=False)
|
|
|
|
| 12 |
pred, idx, probs = learn.predict(img)
|
| 13 |
return dict(zip(categories, map(float, probs)))
|
| 14 |
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
iface = gr.Interface(fn=classify_image, inputs="image", outputs="label")
|
| 17 |
+
iface.launch()
|
|
|