MAGAer13 commited on
Commit
067ff7d
β€’
1 Parent(s): aad11cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -297,26 +297,30 @@ def build_demo(embed_mode):
297
  upvote_last_response,
298
  state,
299
  [textbox, upvote_btn, downvote_btn, flag_btn],
300
- queue=False
 
301
  )
302
  downvote_btn.click(
303
  downvote_last_response,
304
  state,
305
  [textbox, upvote_btn, downvote_btn, flag_btn],
306
- queue=False
 
307
  )
308
  flag_btn.click(
309
  flag_last_response,
310
  state,
311
  [textbox, upvote_btn, downvote_btn, flag_btn],
312
- queue=False
 
313
  )
314
 
315
  regenerate_btn.click(
316
  regenerate,
317
  [state, image_process_mode],
318
  [state, chatbot, textbox, imagebox] + btn_list,
319
- queue=False
 
320
  ).then(
321
  http_bot,
322
  [state, temperature, top_p, max_output_tokens],
@@ -327,7 +331,8 @@ def build_demo(embed_mode):
327
  clear_history,
328
  None,
329
  [state, chatbot, textbox, imagebox] + btn_list,
330
- queue=False
 
331
  )
332
 
333
  textbox.submit(
@@ -345,7 +350,8 @@ def build_demo(embed_mode):
345
  add_text,
346
  [state, textbox, imagebox, image_process_mode],
347
  [state, chatbot, textbox, imagebox] + btn_list,
348
- queue=False
 
349
  ).then(
350
  http_bot,
351
  [state, temperature, top_p, max_output_tokens],
@@ -384,7 +390,6 @@ if __name__ == "__main__":
384
  logger.info(args)
385
  demo = build_demo(args.embed)
386
  demo.queue(
387
- concurrency_count=args.concurrency_count,
388
  api_open=False
389
  ).launch(
390
  server_name=args.host,
 
297
  upvote_last_response,
298
  state,
299
  [textbox, upvote_btn, downvote_btn, flag_btn],
300
+ queue=False,
301
+ concurrency_limit=10,
302
  )
303
  downvote_btn.click(
304
  downvote_last_response,
305
  state,
306
  [textbox, upvote_btn, downvote_btn, flag_btn],
307
+ queue=False,
308
+ concurrency_limit=10,
309
  )
310
  flag_btn.click(
311
  flag_last_response,
312
  state,
313
  [textbox, upvote_btn, downvote_btn, flag_btn],
314
+ queue=False,
315
+ concurrency_limit=10,
316
  )
317
 
318
  regenerate_btn.click(
319
  regenerate,
320
  [state, image_process_mode],
321
  [state, chatbot, textbox, imagebox] + btn_list,
322
+ queue=False,
323
+ concurrency_limit=10,
324
  ).then(
325
  http_bot,
326
  [state, temperature, top_p, max_output_tokens],
 
331
  clear_history,
332
  None,
333
  [state, chatbot, textbox, imagebox] + btn_list,
334
+ queue=False,
335
+ concurrency_limit=10,
336
  )
337
 
338
  textbox.submit(
 
350
  add_text,
351
  [state, textbox, imagebox, image_process_mode],
352
  [state, chatbot, textbox, imagebox] + btn_list,
353
+ queue=False,
354
+ concurrency_limit=10,
355
  ).then(
356
  http_bot,
357
  [state, temperature, top_p, max_output_tokens],
 
390
  logger.info(args)
391
  demo = build_demo(args.embed)
392
  demo.queue(
 
393
  api_open=False
394
  ).launch(
395
  server_name=args.host,