Spaces:
Runtime error
Runtime error
amit-asl
commited on
Commit
·
17bf7ad
1
Parent(s):
e193530
changed
Browse files- app/main.py +9 -10
app/main.py
CHANGED
@@ -9,16 +9,15 @@ def predict_image(image):
|
|
9 |
return pred[0]
|
10 |
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
output = gr.Text()
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
|
|
|
9 |
return pred[0]
|
10 |
|
11 |
|
12 |
+
image_input = gr.Image(type="pil")
|
13 |
+
output = gr.Text()
|
|
|
14 |
|
15 |
+
gr.Interface(
|
16 |
+
fn=predict_image,
|
17 |
+
inputs=image_input,
|
18 |
+
outputs=output,
|
19 |
+
title="Cat or Dog Classifier",
|
20 |
+
description="Upload an image to classify whether it's a cat or a dog."
|
21 |
+
).launch()
|
22 |
|
23 |
|