Spaces:
Sleeping
Sleeping
Fix Gradio queue deprecation
Browse files
app.py
CHANGED
|
@@ -540,11 +540,12 @@ def create_interface():
|
|
| 540 |
localize_btn.click(
|
| 541 |
fn=localize_video,
|
| 542 |
inputs=[video_input, lang_dropdown, api_key_input],
|
| 543 |
-
outputs=[video_output, orig_text, trans_text]
|
|
|
|
| 544 |
)
|
| 545 |
-
|
| 546 |
# Use a small queue to avoid overlapping heavy jobs on shared Spaces
|
| 547 |
-
app.queue(
|
| 548 |
return app
|
| 549 |
|
| 550 |
|
|
|
|
| 540 |
localize_btn.click(
|
| 541 |
fn=localize_video,
|
| 542 |
inputs=[video_input, lang_dropdown, api_key_input],
|
| 543 |
+
outputs=[video_output, orig_text, trans_text],
|
| 544 |
+
concurrency_limit=1,
|
| 545 |
)
|
| 546 |
+
|
| 547 |
# Use a small queue to avoid overlapping heavy jobs on shared Spaces
|
| 548 |
+
app.queue(max_size=4)
|
| 549 |
return app
|
| 550 |
|
| 551 |
|