Update app.py
Browse files
app.py
CHANGED
|
@@ -2,15 +2,15 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
# Assuming you have a dictionary of pet names and their image URLs or file paths
|
| 4 |
pet_images = {
|
| 5 |
-
"David": "
|
| 6 |
-
"Kikou": "
|
| 7 |
# Add as many pets as you have
|
| 8 |
}
|
| 9 |
|
| 10 |
# Define your Gradio interface here
|
| 11 |
def your_function(pet_name):
|
| 12 |
# Handle the input and produce the image path or URL
|
| 13 |
-
image_path = pet_images.get(pet_name, "
|
| 14 |
return image_path
|
| 15 |
|
| 16 |
# Create the interface
|
|
|
|
| 2 |
|
| 3 |
# Assuming you have a dictionary of pet names and their image URLs or file paths
|
| 4 |
pet_images = {
|
| 5 |
+
"David": "./david.jpg",
|
| 6 |
+
"Kikou": "./kikou.jpg",
|
| 7 |
# Add as many pets as you have
|
| 8 |
}
|
| 9 |
|
| 10 |
# Define your Gradio interface here
|
| 11 |
def your_function(pet_name):
|
| 12 |
# Handle the input and produce the image path or URL
|
| 13 |
+
image_path = pet_images.get(pet_name, "./david.jpg") # Default if pet not found
|
| 14 |
return image_path
|
| 15 |
|
| 16 |
# Create the interface
|