Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -271,4 +271,16 @@ with gr.Blocks(css=css, theme=gr.themes.Soft(), delete_cache=(60, 900)) as demo:
|
|
| 271 |
)
|
| 272 |
|
| 273 |
if __name__ == "__main__":
|
| 274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 271 |
)
|
| 272 |
|
| 273 |
if __name__ == "__main__":
|
| 274 |
+
# IMPORTANT: Add API-friendly settings for better session management
|
| 275 |
+
demo.launch(
|
| 276 |
+
mcp_server=True,
|
| 277 |
+
server_name="0.0.0.0", # Allow external connections
|
| 278 |
+
server_port=7860, # Standard port
|
| 279 |
+
show_error=True, # Show detailed errors
|
| 280 |
+
max_threads=40, # Increase thread pool for better concurrency
|
| 281 |
+
auth=None, # No authentication required
|
| 282 |
+
debug=False, # Disable debug mode for production
|
| 283 |
+
enable_queue=True, # Enable request queuing
|
| 284 |
+
max_size=20, # Maximum queue size
|
| 285 |
+
api_open=True # Ensure API endpoints are accessible
|
| 286 |
+
)
|