zhiyuanZY commited on
Commit
34ff4e9
·
verified ·
1 Parent(s): cc6bc79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -454,7 +454,7 @@ async def clear(state: dict) -> tuple:
454
  def build_app() -> gr.Blocks:
455
  validate_config()
456
  with gr.Blocks(title=APP_TITLE, analytics_enabled=ANALYTICS_ENABLED) as demo:
457
- state = gr.State(value=new_session)
458
  job = gr.State(value=None)
459
  gr.Markdown(APP_HEADING_MARKDOWN)
460
  chatbot = gr.Chatbot(
@@ -524,12 +524,12 @@ def build_app() -> gr.Blocks:
524
  queue=False,
525
  api_visibility="private",
526
  )
527
- return demo.queue(max_size=QUEUE_MAX_SIZE)
528
 
529
  demo = build_app()
530
  demo.queue(
531
- default_concurrency_limit=8,
532
- max_size=64,
533
  )
534
 
535
  if __name__ == "__main__":
 
454
  def build_app() -> gr.Blocks:
455
  validate_config()
456
  with gr.Blocks(title=APP_TITLE, analytics_enabled=ANALYTICS_ENABLED) as demo:
457
+ state = gr.State(value=new_session())
458
  job = gr.State(value=None)
459
  gr.Markdown(APP_HEADING_MARKDOWN)
460
  chatbot = gr.Chatbot(
 
524
  queue=False,
525
  api_visibility="private",
526
  )
527
+ return demo
528
 
529
  demo = build_app()
530
  demo.queue(
531
+ default_concurrency_limit=CONCURRENCY_LIMIT,
532
+ max_size=QUEUE_MAX_SIZE,
533
  )
534
 
535
  if __name__ == "__main__":