Spaces:
Running
on
Zero
Running
on
Zero
Add queue system to launch for better long-running operation handling
Browse files
app.py
CHANGED
|
@@ -559,6 +559,9 @@ with gr.Blocks(
|
|
| 559 |
)
|
| 560 |
|
| 561 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
| 562 |
# Password protection - users don't need HF accounts!
|
| 563 |
# Change these to your desired username/password
|
| 564 |
# For multiple users, use: auth=[("user1", "pass1"), ("user2", "pass2")]
|
|
@@ -566,6 +569,7 @@ if __name__ == "__main__":
|
|
| 566 |
server_name="0.0.0.0",
|
| 567 |
server_port=7860,
|
| 568 |
auth=("starflow", "im30"), # Change password!
|
| 569 |
-
share=False # Set to True if you want public Gradio link
|
|
|
|
| 570 |
)
|
| 571 |
|
|
|
|
| 559 |
)
|
| 560 |
|
| 561 |
if __name__ == "__main__":
|
| 562 |
+
# Enable queue for long-running operations
|
| 563 |
+
demo.queue(default_concurrency_limit=1)
|
| 564 |
+
|
| 565 |
# Password protection - users don't need HF accounts!
|
| 566 |
# Change these to your desired username/password
|
| 567 |
# For multiple users, use: auth=[("user1", "pass1"), ("user2", "pass2")]
|
|
|
|
| 569 |
server_name="0.0.0.0",
|
| 570 |
server_port=7860,
|
| 571 |
auth=("starflow", "im30"), # Change password!
|
| 572 |
+
share=False, # Set to True if you want public Gradio link
|
| 573 |
+
max_threads=1 # Limit threads for stability
|
| 574 |
)
|
| 575 |
|