File size: 435 Bytes
315caa2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
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)