Commit
•
f52d753
1
Parent(s):
1752ad5
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,8 @@ def generate_image(caption):
|
|
29 |
return generated_image
|
30 |
|
31 |
# Set up Gradio interface
|
32 |
-
|
|
|
33 |
with gr.Row():
|
34 |
with gr.Column():
|
35 |
image_input = gr.Image(label="Upload any Image", type='pil')
|
@@ -43,5 +44,4 @@ with gr.Blocks() as demo:
|
|
43 |
get_caption_btn.click(get_caption, inputs=image_input, outputs=caption_output)
|
44 |
generate_image_btn.click(generate_image, inputs=caption_output, outputs=generated_image_output)
|
45 |
|
46 |
-
|
47 |
-
demo.launch(title=title)
|
|
|
29 |
return generated_image
|
30 |
|
31 |
# Set up Gradio interface
|
32 |
+
title = "Image Captioning and Generation"
|
33 |
+
with gr.Blocks(title=title) as demo:
|
34 |
with gr.Row():
|
35 |
with gr.Column():
|
36 |
image_input = gr.Image(label="Upload any Image", type='pil')
|
|
|
44 |
get_caption_btn.click(get_caption, inputs=image_input, outputs=caption_output)
|
45 |
generate_image_btn.click(generate_image, inputs=caption_output, outputs=generated_image_output)
|
46 |
|
47 |
+
demo.launch()
|
|