7arunb commited on
Commit
7b815ef
·
1 Parent(s): cb56fe4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -10,17 +10,18 @@ inf = load_learner('export.pkl')
10
 
11
  def classify_img(img):
12
  pred, idx, probs = inf.predict(img)
13
- return dict(zip(categories,map(float,probs)))
 
14
 
15
  #|export
16
 
17
  #This creates the gradio interface
18
 
19
  image = gr.Image(shape=(192,192))
20
- label = gr.outputs.Label()
21
 
22
  #examples = ['cheetah.jpg','leopard.jpg','img.jpg']
23
 
24
- intf = gr.Interface(fn = classify_img, inputs=image,outputs=label)
25
 
26
  intf.launch()
 
10
 
11
  def classify_img(img):
12
  pred, idx, probs = inf.predict(img)
13
+ return pred
14
+ #return dict(zip(categories,map(float,probs)))
15
 
16
  #|export
17
 
18
  #This creates the gradio interface
19
 
20
  image = gr.Image(shape=(192,192))
21
+ label = gr.outputs
22
 
23
  #examples = ['cheetah.jpg','leopard.jpg','img.jpg']
24
 
25
+ intf = gr.Interface(fn = classify_img, inputs=image,outputs=pred)
26
 
27
  intf.launch()