Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -165,14 +165,10 @@ with gr.Blocks(theme='gradio/soft') as demo:
|
|
165 |
task_history = gr.State([])
|
166 |
|
167 |
with gr.Row():
|
168 |
-
with gr.Column(width=4):
|
169 |
upload_btn = gr.UploadButton("π Upload", file_types=["image"], elem_classes="control-width")
|
170 |
-
|
171 |
-
submit_btn = gr.Button("π Submit", elem_classes="control-width")
|
172 |
-
with gr.Column(width=2):
|
173 |
regen_btn = gr.Button("π€οΈ Regenerate", elem_classes="control-width")
|
174 |
-
|
175 |
-
clear_btn = gr.Button("π§Ή Clear History", elem_classes="control-width")
|
176 |
|
177 |
gr.Markdown("### Key Features:\n- **Strong Performance**: Surpasses existing LVLMs on multiple English benchmarks including Zero-shot Captioning and VQA.\n- **Multi-lingual Support**: Supports English, Chinese, and multi-lingual conversation.\n- **High Resolution**: Utilizes 448*448 resolution for fine-grained recognition and understanding.")
|
178 |
submit_btn.click(handle_text_input, [chatbot, task_history, query], [chatbot, task_history]).then(
|
@@ -183,7 +179,8 @@ with gr.Blocks(theme='gradio/soft') as demo:
|
|
183 |
clear_btn.click(clear_history, [task_history], [chatbot], show_progress=True)
|
184 |
regen_btn.click(handle_regeneration, [chatbot, task_history], [chatbot], show_progress=True)
|
185 |
upload_btn.upload(handle_file_upload, [chatbot, task_history, upload_btn], [chatbot, task_history], show_progress=True)
|
186 |
-
audio.
|
|
|
187 |
|
188 |
|
189 |
demo.launch()
|
|
|
165 |
task_history = gr.State([])
|
166 |
|
167 |
with gr.Row():
|
|
|
168 |
upload_btn = gr.UploadButton("π Upload", file_types=["image"], elem_classes="control-width")
|
169 |
+
submit_btn = gr.Button("π Submit", elem_classes="control-width", variant="primary")
|
|
|
|
|
170 |
regen_btn = gr.Button("π€οΈ Regenerate", elem_classes="control-width")
|
171 |
+
clear_btn = gr.Button("π§Ή Clear History", elem_classes="control-width", variant="secondary")
|
|
|
172 |
|
173 |
gr.Markdown("### Key Features:\n- **Strong Performance**: Surpasses existing LVLMs on multiple English benchmarks including Zero-shot Captioning and VQA.\n- **Multi-lingual Support**: Supports English, Chinese, and multi-lingual conversation.\n- **High Resolution**: Utilizes 448*448 resolution for fine-grained recognition and understanding.")
|
174 |
submit_btn.click(handle_text_input, [chatbot, task_history, query], [chatbot, task_history]).then(
|
|
|
179 |
clear_btn.click(clear_history, [task_history], [chatbot], show_progress=True)
|
180 |
regen_btn.click(handle_regeneration, [chatbot, task_history], [chatbot], show_progress=True)
|
181 |
upload_btn.upload(handle_file_upload, [chatbot, task_history, upload_btn], [chatbot, task_history], show_progress=True)
|
182 |
+
audio.change(transcribe_audio, inputs=[audio], outputs=[query])
|
183 |
+
|
184 |
|
185 |
|
186 |
demo.launch()
|