Deploy habadashi_login gateway
Browse files
app.py
CHANGED
|
@@ -236,13 +236,11 @@ print(f" - Health: /healthz")
|
|
| 236 |
print(f" - Logout: /logout")
|
| 237 |
print("=" * 80)
|
| 238 |
|
| 239 |
-
#
|
| 240 |
-
print("[ENTRYPOINT]
|
| 241 |
print(f"[ENTRYPOINT] App type: {type(app)}")
|
|
|
|
|
|
|
| 242 |
|
| 243 |
-
|
| 244 |
-
#
|
| 245 |
-
port = int(os.environ.get("PORT", 7860))
|
| 246 |
-
print(f"[ENTRYPOINT] Binding to 0.0.0.0:{port}")
|
| 247 |
-
print("[ENTRYPOINT] Starting uvicorn server...")
|
| 248 |
-
uvicorn.run(app, host="0.0.0.0", port=port, log_level="info")
|
|
|
|
| 236 |
print(f" - Logout: /logout")
|
| 237 |
print("=" * 80)
|
| 238 |
|
| 239 |
+
# HF Space will automatically serve the 'app' variable
|
| 240 |
+
print("[ENTRYPOINT] FastAPI app with mounted Gradio UIs ready")
|
| 241 |
print(f"[ENTRYPOINT] App type: {type(app)}")
|
| 242 |
+
print("[ENTRYPOINT] HF Space will bind port and serve automatically")
|
| 243 |
+
print("[ENTRYPOINT] No explicit uvicorn.run() needed - HF Space handles this")
|
| 244 |
|
| 245 |
+
# Note: Do NOT call uvicorn.run() here - HF Space does it automatically
|
| 246 |
+
# The 'app' variable (FastAPI with mounted Gradio apps) will be served by HF Space
|
|
|
|
|
|
|
|
|
|
|
|