Spaces:
Sleeping
Sleeping
| """ | |
| CivicAI — HuggingFace Spaces Entry Point | |
| This is the root app.py that HF Spaces expects. | |
| It imports and re-exports the FastAPI app from server.app. | |
| """ | |
| import os | |
| # HF Spaces uses port 7860 by default | |
| os.environ.setdefault("PORT", "7860") | |
| from server.app import app # noqa: F401, E402 | |
| if __name__ == "__main__": | |
| import uvicorn | |
| port = int(os.environ.get("PORT", 7860)) | |
| uvicorn.run(app, host="0.0.0.0", port=port) | |