Spaces:
Build error
Build error
Ashish Kumar commited on
Commit ·
aa98271
1
Parent(s): b3a9819
Force enable API for Gradio Space
Browse files
app.py
CHANGED
|
@@ -253,4 +253,5 @@ if __name__ == '__main__':
|
|
| 253 |
port = int(os.getenv('PORT', 7860))
|
| 254 |
# For localhost and cloud, launch with server_name 0.0.0.0 to allow access from network
|
| 255 |
# Note: show_api parameter removed as it's not supported in all Gradio versions
|
| 256 |
-
|
|
|
|
|
|
| 253 |
port = int(os.getenv('PORT', 7860))
|
| 254 |
# For localhost and cloud, launch with server_name 0.0.0.0 to allow access from network
|
| 255 |
# Note: show_api parameter removed as it's not supported in all Gradio versions
|
| 256 |
+
# Enable API for all environments - required for API access
|
| 257 |
+
app.queue(api_open=True).launch(ssr_mode=True, server_name='0.0.0.0', server_port=port)
|