Englios commited on
Commit
1e921b6
1 Parent(s): e308701

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,7 +4,8 @@ __all__ = ['is_cat','learn','classify_image','categories','image','label','examp
4
  import gradio as gr
5
  from fastai.vision.all import *
6
 
7
- def is_cat(x):return x[0].isupper()
 
8
 
9
  learn = load_learner('model.pkl')
10
 
@@ -14,7 +15,7 @@ def classify_image(img):
14
  pred,idx,probs = learn.predict(img)
15
  return dict(zip(categories,map(float,probs)))
16
 
17
- image = gr.Image((192,192))
18
  label = gr.Label()
19
  examples = ['./Cat.jpg','./dog.jpg','./heh.jpg']
20
 
 
4
  import gradio as gr
5
  from fastai.vision.all import *
6
 
7
+ def is_cat(x):
8
+ return x[0].isupper()
9
 
10
  learn = load_learner('model.pkl')
11
 
 
15
  pred,idx,probs = learn.predict(img)
16
  return dict(zip(categories,map(float,probs)))
17
 
18
+ image = gr.Image(sources="upload")
19
  label = gr.Label()
20
  examples = ['./Cat.jpg','./dog.jpg','./heh.jpg']
21