karimhbadr1 commited on
Commit
118f9ff
·
1 Parent(s): 001151e

Edited python code

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -9,7 +9,9 @@ def classify_image(img):
9
  pred,idx,probs = learn.predict(img)
10
  return dict(zip(categories, map(float,probs)))
11
 
12
- image= gr.Image()
 
 
13
 
14
- iface = gr.Interface(fn=classify_image, inputs=image, outputs="text")
15
  iface.launch()
 
9
  pred,idx,probs = learn.predict(img)
10
  return dict(zip(categories, map(float,probs)))
11
 
12
+ image= gr.Image(width=192,height=192)
13
+ label= gr.Label()
14
+ examples=['black1.jpg','grizzly1.jpg','teddy1.jpg']
15
 
16
+ iface = gr.Interface(fn=classify_image, inputs=image, outputs=label,examples=examples)
17
  iface.launch()