MarziehFadaee commited on
Commit
f56b599
·
verified ·
1 Parent(s): ac9ef60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -93,7 +93,7 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
93
 
94
  with gr.Column():
95
  with gr.Row():
96
- chatbot = gr.Chatbot(show_label=False)
97
 
98
  with gr.Row():
99
  user_message = gr.Textbox(lines=1, placeholder="Ask anything ...", label="Input", show_label=False)
@@ -108,10 +108,10 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
108
  cid = str(uuid.uuid4())
109
 
110
 
111
- user_message.submit(fn=generate_response, inputs=[user_message, history], outputs=[chatbot, history])
112
 
113
- submit_button.click(fn=generate_response, inputs=[user_message, history], outputs=[chatbot, history])
114
- clear_button.click(fn=clear_chat, inputs=None, outputs=[chatbot, history])
115
 
116
  with gr.Row():
117
  gr.Examples(
@@ -123,4 +123,4 @@ with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
123
  )
124
 
125
  if __name__ == "__main__":
126
- demo.queue(concurrency_count=16).launch(debug=True)
 
93
 
94
  with gr.Column():
95
  with gr.Row():
96
+ chatbot = gr.Chatbot(show_label=False, concurrency_limit=32)
97
 
98
  with gr.Row():
99
  user_message = gr.Textbox(lines=1, placeholder="Ask anything ...", label="Input", show_label=False)
 
108
  cid = str(uuid.uuid4())
109
 
110
 
111
+ user_message.submit(fn=generate_response, inputs=[user_message, history], outputs=[chatbot, history], concurrency_limit=32)
112
 
113
+ submit_button.click(fn=generate_response, inputs=[user_message, history], outputs=[chatbot, history], concurrency_limit=32)
114
+ clear_button.click(fn=clear_chat, inputs=None, outputs=[chatbot, history], concurrency_limit=32)
115
 
116
  with gr.Row():
117
  gr.Examples(
 
123
  )
124
 
125
  if __name__ == "__main__":
126
+ demo.launch(debug=True)