Spaces:
Runtime error
Runtime error
Update response perf.
Browse files
app.py
CHANGED
@@ -47,7 +47,8 @@ def format_text(text):
|
|
47 |
return text
|
48 |
|
49 |
|
50 |
-
def get_chat_response(chatbot, task_history
|
|
|
51 |
chat_query = chatbot[-1][0]
|
52 |
query = task_history[-1][0]
|
53 |
history_cp = copy.deepcopy(task_history)
|
@@ -156,8 +157,8 @@ with gr.Blocks(css=css) as demo:
|
|
156 |
|
157 |
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.")
|
158 |
submit_btn.click(handle_text_input, [chatbot, task_history, query], [chatbot, task_history]).then(
|
159 |
-
|
160 |
-
)
|
161 |
|
162 |
|
163 |
|
|
|
47 |
return text
|
48 |
|
49 |
|
50 |
+
def get_chat_response(chatbot, task_history):
|
51 |
+
global model, tokenizer
|
52 |
chat_query = chatbot[-1][0]
|
53 |
query = task_history[-1][0]
|
54 |
history_cp = copy.deepcopy(task_history)
|
|
|
157 |
|
158 |
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.")
|
159 |
submit_btn.click(handle_text_input, [chatbot, task_history, query], [chatbot, task_history]).then(
|
160 |
+
get_chat_response, [chatbot, task_history], [chatbot], show_progress=True
|
161 |
+
)
|
162 |
|
163 |
|
164 |
|