sheikhed commited on
Commit
2efc853
·
verified ·
1 Parent(s): 5605d6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -191,11 +191,12 @@ def create_interface():
191
  fn=on_generate,
192
  inputs=[voice_dropdown, video_url_input, text_input],
193
  outputs=[video_output, status_output],
194
- concurrency_limit=None # Allow unlimited concurrent runs
195
  )
196
 
197
  return app
198
 
199
  if __name__ == "__main__":
200
  app = create_interface()
201
- app.launch(concurrent_tasks=10) # Allow up to 5 concurrent tasks
 
 
191
  fn=on_generate,
192
  inputs=[voice_dropdown, video_url_input, text_input],
193
  outputs=[video_output, status_output],
194
+ api_name="generate" # This allows the function to be called via API
195
  )
196
 
197
  return app
198
 
199
  if __name__ == "__main__":
200
  app = create_interface()
201
+ app.queue(concurrency_count=5, max_size=20) # Allow up to 5 concurrent tasks, queue up to 20
202
+ app.launch()