lmyrick29 commited on
Commit
844ca91
1 Parent(s): 0575ceb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from fastai.vision.all import *
3
 
4
- def is_sword(x): return x[0].isupper()
5
  learn = load_learner('model.pkl')
6
 
7
- categories = ('sword', 'shield')
8
 
9
  def classify_image(img):
10
  pred,idx,probs = learn.predict(img)
@@ -12,7 +12,7 @@ def classify_image(img):
12
 
13
  image = gr.Image(height=192, width = 192)
14
  label = gr.Label()
15
- examples = ['sword.jpg', 'shield.jpg']
16
 
17
  inf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
18
  inf.launch(inline=False,share=True)
 
1
  import gradio as gr
2
  from fastai.vision.all import *
3
 
4
+ def is_cat(x): return x[0].isupper()
5
  learn = load_learner('model.pkl')
6
 
7
+ categories = ('cat', 'forest')
8
 
9
  def classify_image(img):
10
  pred,idx,probs = learn.predict(img)
 
12
 
13
  image = gr.Image(height=192, width = 192)
14
  label = gr.Label()
15
+ examples = ['cat.jpg', 'forest.jpg']
16
 
17
  inf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
18
  inf.launch(inline=False,share=True)