Spaces:
Senamy
/
Runtime error

Senamy commited on
Commit
eb7ba1b
·
verified ·
1 Parent(s): eb935f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -52,7 +52,7 @@ if __name__ == "__main__":
52
  <h3 align='center'> \
53
  🤗HF models: \
54
  <a href='https://huggingface.co/BAAI/Emu2' target='_blank' rel='noopener'>Emu2</a> | \
55
- [<a href='https://huggingface.co/BAAI/Emu2-Chat' target='_blank' rel='noopener'>Emu2-Chat</a> | \
56
  <a href='https://huggingface.co/BAAI/Emu2-Gen' target='_blank' rel='noopener'>Emu2-Gen</a> \
57
  </h3> \
58
  <h4 align='center'> \
@@ -79,11 +79,16 @@ if __name__ == "__main__":
79
  title=title,
80
  )
81
 
82
- # Gradio 6.x 中 queue() 方法参数已更改
83
- # 现在直接将队列参数传递给 launch() 方法
84
- demo_all.queue().launch(
85
- enable_queue=True,
86
- concurrency_count=args.concurrency_count, # 移动到 launch()
 
 
 
 
 
87
  server_name=args.host,
88
  server_port=args.port,
89
  share=args.share,
 
52
  <h3 align='center'> \
53
  🤗HF models: \
54
  <a href='https://huggingface.co/BAAI/Emu2' target='_blank' rel='noopener'>Emu2</a> | \
55
+ <a href='https://huggingface.co/BAAI/Emu2-Chat' target='_blank' rel='noopener'>Emu2-Chat</a> | \
56
  <a href='https://huggingface.co/BAAI/Emu2-Gen' target='_blank' rel='noopener'>Emu2-Gen</a> \
57
  </h3> \
58
  <h4 align='center'> \
 
79
  title=title,
80
  )
81
 
82
+ # Gradio 6.x 中
83
+ # 1. queue() 调用后会自动启用队列
84
+ # 2. enable_queue 参数已移除
85
+ # 3. concurrency_count 等参数可以传递给 queue() 或 launch()
86
+
87
+ demo_all.queue(
88
+ concurrency_count=args.concurrency_count, # 在这里设置并发数
89
+ status_update_rate=3,
90
+ api_open=False,
91
+ ).launch(
92
  server_name=args.host,
93
  server_port=args.port,
94
  share=args.share,