Spaces:
Runtime error
Runtime error
fix example
Browse files
app.py
CHANGED
@@ -16,14 +16,12 @@ def generate_caption(image, prompt):
|
|
16 |
|
17 |
return caption
|
18 |
|
19 |
-
# Load the demo image
|
20 |
-
demo_image = Image.open("jungle-glass.png")
|
21 |
-
|
22 |
# Define the Gradio interface
|
23 |
iface = gr.Interface(
|
24 |
fn=generate_caption,
|
25 |
-
inputs=[gr.Image(type="pil", label="Upload Image"
|
26 |
outputs=gr.Textbox(label="Generated Caption"),
|
|
|
27 |
)
|
28 |
|
29 |
# Launch the interface
|
|
|
16 |
|
17 |
return caption
|
18 |
|
|
|
|
|
|
|
19 |
# Define the Gradio interface
|
20 |
iface = gr.Interface(
|
21 |
fn=generate_caption,
|
22 |
+
inputs=[gr.Image(type="pil", label="Upload Image"), gr.Textbox(label="Prompt")],
|
23 |
outputs=gr.Textbox(label="Generated Caption"),
|
24 |
+
examples=[["jungle-glass.png", ""]]
|
25 |
)
|
26 |
|
27 |
# Launch the interface
|