zhongdj commited on
Commit
992fc6d
·
1 Parent(s): 84f9b06
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -8,5 +8,8 @@ def predict(img):
8
  pred, pred_idx, probs = learn_inf.predict(img.to_thumb(224))
9
  return f'Prediction: {pred}; Probability:{probs[pred_idx]:.04f}'
10
 
11
- iface = gr.Interface(fn=predict, inputs="image", outputs="text")
12
- iface.launch()
 
 
 
 
8
  pred, pred_idx, probs = learn_inf.predict(img.to_thumb(224))
9
  return f'Prediction: {pred}; Probability:{probs[pred_idx]:.04f}'
10
 
11
+ image = gr.inputs.Image(shape=(192, 192))
12
+ label = gr.outputs.Label()
13
+
14
+ iface = gr.Interface(fn=predict, inputs=image, outputs=label)
15
+ iface.launch(inline=False)