yexuefeng commited on
Commit
dcd9be2
·
1 Parent(s): 60ad621
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,6 +1,8 @@
1
  from fastai.vision.all import *
2
  import gradio as gr
3
 
 
 
4
  categories = ("grizzly bear", "black bear", "teddy bear")
5
 
6
  learn = load_learner("export.pkl")
@@ -9,7 +11,7 @@ def classify_image(img):
9
  pred, idx, probs = learn.predict(img)
10
  return dict(zip(categories, map(float, probs)))
11
 
12
- image = gr.inputs.Image(shape=(192, 192))
13
  examples = ["bears.jpg", "grizzly.jpg"]
14
  label = gr.outputs.Label()
15
  def greet(name):
 
1
  from fastai.vision.all import *
2
  import gradio as gr
3
 
4
+ print(gr.__version__)
5
+
6
  categories = ("grizzly bear", "black bear", "teddy bear")
7
 
8
  learn = load_learner("export.pkl")
 
11
  pred, idx, probs = learn.predict(img)
12
  return dict(zip(categories, map(float, probs)))
13
 
14
+ image = gr.Image(shape=(192, 192))
15
  examples = ["bears.jpg", "grizzly.jpg"]
16
  label = gr.outputs.Label()
17
  def greet(name):