Spaces:
Runtime error
Runtime error
bonosa commited on
Commit Β·
7769d7f
1
Parent(s): 26e94d3
yay!
Browse files- app.py +17 -2
- caique.jpg +0 -0
- cockatiel.jpg +0 -0
- grey.jpg +0 -0
- macaw.jpg +0 -0
app.py
CHANGED
|
@@ -20,5 +20,20 @@ def predict_parrot_species(image):
|
|
| 20 |
input_image = Image(shape=(224, 224))
|
| 21 |
output_label = Label()
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
input_image = Image(shape=(224, 224))
|
| 21 |
output_label = Label()
|
| 22 |
|
| 23 |
+
# Add a list of sample image URLs
|
| 24 |
+
example_images = [
|
| 25 |
+
"caique.jpg",
|
| 26 |
+
"grey.jpg",
|
| 27 |
+
"macaw.jpg",
|
| 28 |
+
"cockatiel.jpg"
|
| 29 |
+
]
|
| 30 |
+
description_text = "Example images for this app:"
|
| 31 |
+
|
| 32 |
+
gr_interface = gradio.Interface(
|
| 33 |
+
fn=predict_parrot_species,
|
| 34 |
+
inputs=input_image,
|
| 35 |
+
outputs=output_label,
|
| 36 |
+
description=description_text,
|
| 37 |
+
examples=example_images
|
| 38 |
+
)
|
| 39 |
+
gr_interface.launch()
|
caique.jpg
ADDED
|
cockatiel.jpg
ADDED
|
grey.jpg
ADDED
|
macaw.jpg
ADDED
|