Fix queue configuration and optimize thread settings
Browse files
app.py
CHANGED
@@ -64,14 +64,14 @@ demo = gr.Interface(
|
|
64 |
|
65 |
# Mount the Gradio app and launch
|
66 |
if __name__ == "__main__":
|
67 |
-
demo.queue(concurrency_count=3) # Allow multiple concurrent requests
|
68 |
app = gr.mount_gradio_app(app, demo, path="/")
|
|
|
69 |
demo.launch(
|
70 |
server_name="0.0.0.0",
|
71 |
server_port=7860,
|
72 |
-
enable_queue=True,
|
73 |
show_api=True, # Enable API documentation
|
74 |
share=False, # Not needed in Spaces
|
75 |
debug=True,
|
76 |
-
root_path=""
|
|
|
77 |
)
|
|
|
64 |
|
65 |
# Mount the Gradio app and launch
|
66 |
if __name__ == "__main__":
|
|
|
67 |
app = gr.mount_gradio_app(app, demo, path="/")
|
68 |
+
demo.queue() # Enable queue with default settings
|
69 |
demo.launch(
|
70 |
server_name="0.0.0.0",
|
71 |
server_port=7860,
|
|
|
72 |
show_api=True, # Enable API documentation
|
73 |
share=False, # Not needed in Spaces
|
74 |
debug=True,
|
75 |
+
root_path="",
|
76 |
+
max_threads=40 # Increase max threads for better performance
|
77 |
)
|