Shresht-Venkat commited on
Commit
fba55dd
·
verified ·
1 Parent(s): 3d38873

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,10 +14,10 @@ def classify_image(img):
14
  pred,idx,probs = learn.predict(img)
15
  return dict(zip(categories, map(float,probs)))
16
 
17
- image = gr.input.Image(shape = (192,192))
18
- label = gr.outputs.Label()
19
  examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
20
 
21
 
22
- intf = gr.Interface(fn= classify_image, inputs= image , outputs= label, examples = examples)
23
  intf.launch(inline = False)
 
14
  pred,idx,probs = learn.predict(img)
15
  return dict(zip(categories, map(float,probs)))
16
 
17
+ #image = gr.input.Image(shape = (192,192))
18
+ #label = gr.outputs.Label()
19
  examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
20
 
21
 
22
+ intf = gr.Interface(fn= classify_image, inputs= gr.Image(type=“pil”) , outputs= gr.Label(), examples = examples)
23
  intf.launch(inline = False)