Spaces:
Runtime error
Runtime error
Update response function
Browse files
app.py
CHANGED
@@ -160,13 +160,14 @@ with gr.Blocks(css=css) as demo:
|
|
160 |
|
161 |
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.")
|
162 |
submit_btn.click(handle_text_input, [chatbot, task_history, query], [chatbot, task_history]).then(
|
163 |
-
|
164 |
-
|
|
|
165 |
submit_btn.click(clear_input, [], [query])
|
166 |
clear_btn.click(clear_history, [task_history], [chatbot], show_progress=True)
|
167 |
regen_btn.click(handle_regeneration, [chatbot, task_history], [chatbot], show_progress=True)
|
168 |
upload_btn.upload(handle_file_upload, [chatbot, task_history, upload_btn], [chatbot, task_history], show_progress=True)
|
169 |
|
170 |
|
171 |
-
demo.launch(
|
172 |
|
|
|
160 |
|
161 |
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.")
|
162 |
submit_btn.click(handle_text_input, [chatbot, task_history, query], [chatbot, task_history]).then(
|
163 |
+
get_chat_response, [chatbot, task_history, model, tokenizer], [chatbot], show_progress=True
|
164 |
+
)
|
165 |
+
|
166 |
submit_btn.click(clear_input, [], [query])
|
167 |
clear_btn.click(clear_history, [task_history], [chatbot], show_progress=True)
|
168 |
regen_btn.click(handle_regeneration, [chatbot, task_history], [chatbot], show_progress=True)
|
169 |
upload_btn.upload(handle_file_upload, [chatbot, task_history, upload_btn], [chatbot, task_history], show_progress=True)
|
170 |
|
171 |
|
172 |
+
demo.launch()
|
173 |
|