hemanthkr commited on
Commit
4dddaf2
·
1 Parent(s): 33efe1f

resolved gradio runtime errors with inputs and labels.

Browse files
Files changed (1) hide show
  1. app.py +2 -5
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 = gr.Interface(fn=classify_image, inputs=image, outputs=label)
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()