Safi commited on
Commit
a436014
·
1 Parent(s): 421a493
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -3,7 +3,9 @@ import gradio as gr
3
 
4
  learn = load_learner('export.pkl')
5
 
6
- catagories = 'apple','barn owl','guacamole','parrot',
 
 
7
 
8
  def classify_img(img):
9
  pred_class,pred_idx,probs = learn.predict(img)
@@ -11,7 +13,7 @@ def classify_img(img):
11
 
12
  image = gr.inputs.Image(shape=(256,256))
13
  label = gr.outputs.Label()
14
- examples = ['apple.png','owl.png','parrot.png','guacamole.png']
15
 
16
- intf = gr.Interface(fn=classify_img, inputs=image, outputs=label, examples=examples)
17
  intf.launch()
 
3
 
4
  learn = load_learner('export.pkl')
5
 
6
+ #catagories = 'apple','barn owl','guacamole','parrot',
7
+ catagories = ["white tiger", "bengal tiger", "cheetah", "dog", "jackal", "horse", "donkey", "rose", "Shoeblackplant", "Lychee", "strawberry"]
8
+ catagories.sort()
9
 
10
  def classify_img(img):
11
  pred_class,pred_idx,probs = learn.predict(img)
 
13
 
14
  image = gr.inputs.Image(shape=(256,256))
15
  label = gr.outputs.Label()
16
+ #examples = ['apple.png','owl.png','parrot.png','guacamole.png']
17
 
18
+ intf = gr.Interface(fn=classify_img, inputs=image, outputs=label,)# examples=examples)
19
  intf.launch()