Update app.py
Browse files
app.py
CHANGED
|
@@ -23,12 +23,11 @@ def generate_caption(image):
|
|
| 23 |
return f"Error: {response.status_code} - {response.text}"
|
| 24 |
|
| 25 |
|
| 26 |
-
|
| 27 |
# Gradio interface
|
| 28 |
|
| 29 |
demo = gr.Interface(
|
| 30 |
fn=generate_caption,
|
| 31 |
-
inputs=gr.
|
| 32 |
outputs=gr.outputs.Textbox(label="Generated Caption"),
|
| 33 |
examples=[image1, image2, image3],
|
| 34 |
title="Image Captioning App",
|
|
|
|
| 23 |
return f"Error: {response.status_code} - {response.text}"
|
| 24 |
|
| 25 |
|
|
|
|
| 26 |
# Gradio interface
|
| 27 |
|
| 28 |
demo = gr.Interface(
|
| 29 |
fn=generate_caption,
|
| 30 |
+
inputs=gr.Image(type="file", label="Upload Image"),
|
| 31 |
outputs=gr.outputs.Textbox(label="Generated Caption"),
|
| 32 |
examples=[image1, image2, image3],
|
| 33 |
title="Image Captioning App",
|