ireneng commited on
Commit
3448d7f
1 Parent(s): 1bb6bd9

experiment with component

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -13,8 +13,9 @@ def predict(img):
13
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
14
 
15
  title = "Fruit Classifier"
16
-
17
- app = gr.Interface(fn=predict, inputs="image", outputs="label",title=title)
 
18
  app.launch()
19
 
20
 
 
13
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
14
 
15
  title = "Fruit Classifier"
16
+ image = gr.Image(shape=(224, 224))
17
+ label = gr.Label(num_top_classes=6)
18
+ app = gr.Interface(fn=predict, inputs=image, outputs=label,title=title, share=True)
19
  app.launch()
20
 
21