Commit
·
02311bb
1
Parent(s):
19f4cc6
refactor(app): remove theme param; unify server port env var
Browse files- Removed the theme argument from gr.Blocks to prevent an undefined reference
- Changed server port to prefer GRADIO_SERVER_PORT over PORT to align with Gradio defaults
app.py
CHANGED
|
@@ -462,7 +462,6 @@ class SpacesApp:
|
|
| 462 |
|
| 463 |
with gr.Blocks(
|
| 464 |
title="Secure AI Agents Suite",
|
| 465 |
-
theme=theme,
|
| 466 |
css=custom_css,
|
| 467 |
analytics_enabled=False
|
| 468 |
) as interface:
|
|
@@ -968,7 +967,7 @@ if __name__ == "__main__":
|
|
| 968 |
|
| 969 |
# Configure server settings for Spaces
|
| 970 |
server_name = os.getenv("HOST", "0.0.0.0")
|
| 971 |
-
server_port = int(os.getenv("PORT", "7860"))
|
| 972 |
|
| 973 |
logger.info(f"Starting application on {server_name}:{server_port}")
|
| 974 |
|
|
|
|
| 462 |
|
| 463 |
with gr.Blocks(
|
| 464 |
title="Secure AI Agents Suite",
|
|
|
|
| 465 |
css=custom_css,
|
| 466 |
analytics_enabled=False
|
| 467 |
) as interface:
|
|
|
|
| 967 |
|
| 968 |
# Configure server settings for Spaces
|
| 969 |
server_name = os.getenv("HOST", "0.0.0.0")
|
| 970 |
+
server_port = int(os.getenv("GRADIO_SERVER_PORT", os.getenv("PORT", "7860")))
|
| 971 |
|
| 972 |
logger.info(f"Starting application on {server_name}:{server_port}")
|
| 973 |
|