import os import uvicorn if __name__ == "__main__": # Honor $PORT so the same entrypoint works locally (8000) and on # Hugging Face Spaces (7860, set in the Docker image / Space config). port = int(os.environ.get("PORT", "8000")) uvicorn.run("server.main:app", host="0.0.0.0", port=port, reload=False)