Spaces:
Sleeping
Sleeping
Donald Kapyouo
commited on
Commit
·
29d8965
1
Parent(s):
1f08ab2
update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,11 @@ def predict_image(img):
|
|
11 |
pred, pred_idx, probs = learn.predict(img)
|
12 |
return dict(zip(categories, map(float, probs)))
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
11 |
pred, pred_idx, probs = learn.predict(img)
|
12 |
return dict(zip(categories, map(float, probs)))
|
13 |
|
14 |
+
with gr.Blocks() as demo:
|
15 |
+
gr.Markdown("# Cat or Dog Classifier Demo FastAI By Donald and Elvis")
|
16 |
+
image = gr.Image()
|
17 |
+
label = gr.Label()
|
18 |
+
examples = ["cat.jpg", "dog.jpg"]
|
19 |
+
gr.Interface(fn=predict_image, inputs=image, outputs=label)
|
20 |
+
|
21 |
+
demo.launch()
|