artificialguybr John6666 commited on
Commit
67dcfa5
1 Parent(s): 0c733dc

Update app.py (#11)

Browse files

- Update app.py (619f7a08c5ace0c7fc46fc4a20f7018ad35b4d99)


Co-authored-by: John Smith <John6666@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -97,7 +97,7 @@ def _launch_demo(args, model, tokenizer, config):
97
  **Qwen is currently SOTA in the benchmarks for 14B models.**
98
  **Test QWEN-VL. A multimodal model that accept images! [QWEN-VL](https://huggingface.co/spaces/artificialguybr/qwen-vl)**
99
  """)
100
- chatbot = gr.Chatbot(label='Qwen-Chat', elem_classes="control-height", queue=True)
101
  query = gr.Textbox(lines=2, label='Input')
102
  task_history = gr.State([])
103
 
@@ -106,7 +106,7 @@ def _launch_demo(args, model, tokenizer, config):
106
  empty_btn = gr.Button("🧹 Clear History")
107
  regen_btn = gr.Button("🤔️ Regenerate")
108
 
109
- submit_btn.click(predict, [query, chatbot, task_history], [chatbot], show_progress=True) # Enable queue
110
  submit_btn.click(reset_user_input, [], [query], queue=False) #No queue for resetting
111
  empty_btn.click(reset_state, [chatbot, task_history], outputs=[chatbot], show_progress=True) #No queue for clearing
112
  regen_btn.click(regenerate, [chatbot, task_history], [chatbot], show_progress=True) # Enable queue
 
97
  **Qwen is currently SOTA in the benchmarks for 14B models.**
98
  **Test QWEN-VL. A multimodal model that accept images! [QWEN-VL](https://huggingface.co/spaces/artificialguybr/qwen-vl)**
99
  """)
100
+ chatbot = gr.Chatbot(label='Qwen-Chat', elem_classes="control-height")
101
  query = gr.Textbox(lines=2, label='Input')
102
  task_history = gr.State([])
103
 
 
106
  empty_btn = gr.Button("🧹 Clear History")
107
  regen_btn = gr.Button("🤔️ Regenerate")
108
 
109
+ submit_btn.click(predict, [query, chatbot, task_history], [chatbot], show_progress=True, queue=True) # Enable queue
110
  submit_btn.click(reset_user_input, [], [query], queue=False) #No queue for resetting
111
  empty_btn.click(reset_state, [chatbot, task_history], outputs=[chatbot], show_progress=True) #No queue for clearing
112
  regen_btn.click(regenerate, [chatbot, task_history], [chatbot], show_progress=True) # Enable queue