Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -118,15 +118,16 @@ def create_interface():
|
|
| 118 |
)
|
| 119 |
else:
|
| 120 |
gr.Markdown("No example images found in the img directory.")
|
|
|
|
| 121 |
with gr.Row():
|
| 122 |
with gr.Column():
|
| 123 |
-
#
|
| 124 |
-
image_input
|
| 125 |
|
| 126 |
# Parameters
|
| 127 |
with gr.Accordion("Advanced Parameters", open=False):
|
| 128 |
beam_size = gr.Slider(minimum=1, maximum=10, value=5, step=1,
|
| 129 |
-
|
| 130 |
|
| 131 |
# Generate button
|
| 132 |
generate_btn = gr.Button("Generate Caption")
|
|
@@ -142,7 +143,6 @@ def create_interface():
|
|
| 142 |
outputs=caption_output
|
| 143 |
)
|
| 144 |
|
| 145 |
-
|
| 146 |
return demo
|
| 147 |
|
| 148 |
if __name__ == "__main__":
|
|
|
|
| 118 |
)
|
| 119 |
else:
|
| 120 |
gr.Markdown("No example images found in the img directory.")
|
| 121 |
+
|
| 122 |
with gr.Row():
|
| 123 |
with gr.Column():
|
| 124 |
+
# 3. Manually render the image input HERE (Visual location: LEFT COLUMN)
|
| 125 |
+
image_input.render()
|
| 126 |
|
| 127 |
# Parameters
|
| 128 |
with gr.Accordion("Advanced Parameters", open=False):
|
| 129 |
beam_size = gr.Slider(minimum=1, maximum=10, value=5, step=1,
|
| 130 |
+
label="Beam Size")
|
| 131 |
|
| 132 |
# Generate button
|
| 133 |
generate_btn = gr.Button("Generate Caption")
|
|
|
|
| 143 |
outputs=caption_output
|
| 144 |
)
|
| 145 |
|
|
|
|
| 146 |
return demo
|
| 147 |
|
| 148 |
if __name__ == "__main__":
|