rsandadi commited on
Commit
124d114
1 Parent(s): dee90d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
  def is_cat(x): return x[0].isupper()
5
 
6
  learn=load_learner('export.pkl')
7
- categories = ('Grizzly','Black','Teddy')
8
  def classify_image(img):
9
  pred,idx,confidence = learn.predict(img)
10
  return dict(zip(categories,map(float,confidence)))
@@ -13,6 +13,6 @@ def classify_image(img):
13
 
14
  image = gr.inputs.Image(shape=(192,192))
15
  label = gr.outputs.Label()
16
- examples = ['grizzly.jpg','black.jpg','teddy.jpg']
17
  intf = gr.Interface(fn=classify_image,inputs=image,outputs=label,examples=examples)
18
  intf.launch(share=True)
 
4
  def is_cat(x): return x[0].isupper()
5
 
6
  learn=load_learner('export.pkl')
7
+ categories = ('grizzly','black','teddy')
8
  def classify_image(img):
9
  pred,idx,confidence = learn.predict(img)
10
  return dict(zip(categories,map(float,confidence)))
 
13
 
14
  image = gr.inputs.Image(shape=(192,192))
15
  label = gr.outputs.Label()
16
+ examples = ['black.jpg','grizzly.jpg','teddy.jpg']
17
  intf = gr.Interface(fn=classify_image,inputs=image,outputs=label,examples=examples)
18
  intf.launch(share=True)