File size: 325 Bytes
cc15101
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
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)