Spaces:
Sleeping
Sleeping
| import os | |
| import sys | |
| # Ensure project root (/app in Docker, the repo root locally) is on sys.path | |
| _ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) | |
| if _ROOT not in sys.path: | |
| sys.path.insert(0, _ROOT) | |
| import uvicorn | |
| if __name__ == "__main__": | |
| uvicorn.run( | |
| "server.app:app", | |
| host="0.0.0.0", | |
| port=int(os.getenv("PORT", 8000)), | |
| reload=False, | |
| log_level="info", | |
| ) | |