add fastai to requirements.txt
Browse files- app.py +8 -3
- 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=
|
13 |
-
outputs=
|
|
|
14 |
title="Pet classifier")
|
15 |
-
|
|
|
|
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 |
-
|
|
|
|
1 |
+
fast.ai
|
2 |
+
gradio
|