cmck commited on
Commit
88afc4b
1 Parent(s): a2f64c2

add fastai to requirements.txt

Browse files
Files changed (2) hide show
  1. app.py +8 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -8,8 +8,13 @@ def classify_image(img):
8
  pred,idx,probs = learn.predict(img)
9
  return dict(zip(categories, map(float,probs)))
10
 
 
 
 
11
  iface = gr.Interface(fn=classify_image,
12
- inputs=gr.inputs.Image(shape=(512, 512)),
13
- outputs=gr.outputs.Label(num_top_classes=1),
 
14
  title="Pet classifier")
15
- iface.launch()
 
 
8
  pred,idx,probs = learn.predict(img)
9
  return dict(zip(categories, map(float,probs)))
10
 
11
+ inp_img = gr.inputs.Image(shape=(512, 512))
12
+ out_label = gr.outputs.Label(),
13
+
14
  iface = gr.Interface(fn=classify_image,
15
+ inputs=inp_img,
16
+ outputs=out_label,
17
+ examples=examples,
18
  title="Pet classifier")
19
+
20
+ iface.launch(inline=False)
requirements.txt CHANGED
@@ -1 +1,2 @@
1
- gradio
 
 
1
+ fast.ai
2
+ gradio