Spaces:
Runtime error
Runtime error
Commit
•
f8a9c01
1
Parent(s):
39b6f7e
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,12 @@ pet_images = {
|
|
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
|
17 |
iface = gr.Interface(fn=your_function, inputs="text", outputs="image")
|
18 |
|
19 |
# Launch the interface
|
20 |
-
iface.launch()
|
|
|
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, "./download.jpg") # Use a valid default image path
|
14 |
return image_path
|
15 |
|
16 |
+
# Make sure to create a 'default_pet.jpg' file or provide a valid URL for this default image
|
17 |
# Create the interface
|
18 |
iface = gr.Interface(fn=your_function, inputs="text", outputs="image")
|
19 |
|
20 |
# Launch the interface
|
21 |
+
iface.launch()
|