cthai721 commited on
Commit
d22cc76
·
1 Parent(s): af025ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ def is_cat(x): return x[0].isupper()
7
  learn = load_learner('model.pkl')
8
 
9
  # Cell
10
- categories = ('Cat', 'Not Cate')
11
 
12
  def classify_image(img):
13
  pred,idx,probs = learn.predict(img)
@@ -16,7 +16,7 @@ def classify_image(img):
16
  # Cell
17
  image = gr.inputs.Image(shape=(192, 192))
18
  label = gr.outputs.Label()
19
- # examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
20
 
21
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
22
  intf.launch(inline=False)
 
7
  learn = load_learner('model.pkl')
8
 
9
  # Cell
10
+ categories = ('Cat', 'Not Cat')
11
 
12
  def classify_image(img):
13
  pred,idx,probs = learn.predict(img)
 
16
  # Cell
17
  image = gr.inputs.Image(shape=(192, 192))
18
  label = gr.outputs.Label()
19
+ examples = ['forest.jpg', 'cat.jpg']
20
 
21
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
22
  intf.launch(inline=False)