MaziyarPanahi commited on
Commit
c99ac11
·
unverified ·
1 Parent(s): cef2cb2

increase limit and close APIs

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -176,7 +176,7 @@ with gr.Blocks() as demo:
176
  # print(json_data['choices'][0])
177
 
178
  msg.submit(
179
- user, [msg, chatbot], [msg, chatbot], queue=False, concurrency_limit=10
180
  ).then(
181
  bot,
182
  inputs=[
@@ -194,6 +194,6 @@ with gr.Blocks() as demo:
194
  clear.click(lambda: None, None, chatbot, queue=False)
195
 
196
 
197
- demo.queue()
198
  if __name__ == "__main__":
199
  demo.launch(show_api=False, share=False)
 
176
  # print(json_data['choices'][0])
177
 
178
  msg.submit(
179
+ user, [msg, chatbot], [msg, chatbot], queue=True, concurrency_limit=10
180
  ).then(
181
  bot,
182
  inputs=[
 
194
  clear.click(lambda: None, None, chatbot, queue=False)
195
 
196
 
197
+ demo.queue(default_concurrency_limit=20, max_size=20, api_open=False)
198
  if __name__ == "__main__":
199
  demo.launch(show_api=False, share=False)