Deploy habadashi_login gateway
Browse files235 unmodified lines236237238239240241242243244245246247248235 unmodified linesprint(f" - Logout: /logout")print("=" * 80)# Launch the app immediately at module level for HF Spaceprint("[ENTRYPOINT] Launching app at module level for HF Space compatibility")print(f"[ENTRYPOINT] App type: {type(app)}")import uvicorn# Use environment variable PORT if available (HF Space sets this)port = int(os.environ.get("PORT", 7860))print(f"[ENTRYPOINT] Binding to 0.0.0.0:{port}")print("[ENTRYPOINT] Starting uvicorn server...")uvicorn.run(app, host="0.0.0.0", port=port, log_level="info")235 unmodified lines236237238239240241242243244245246235 unmodified linesprint(f" - Logout: /logout")print("=" * 80)# HF Space will automatically serve the 'app' variableprint("[ENTRYPOINT] FastAPI app with mounted Gradio UIs ready")print(f"[ENTRYPOINT] App type: {type(app)}")print("[ENTRYPOINT] HF Space will bind port and serve automatically")print("[ENTRYPOINT] No explicit uvicorn.run() needed - HF Space handles this")# Note: Do NOT call uvicorn.run() here - HF Space does it automatically# The 'app' variable (FastAPI with mounted Gradio apps) will be served by HF Space
app.py+6-8