Spaces:
Running
Running
Download server/app.py from MahirPatelCG/openenv-support: direct link, hf CLI and curl.
- Browser
- Download file 389 Bytes
-
https://huggingface.co/spaces/MahirPatelCG/openenv-support/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/MahirPatelCG/openenv-support/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/MahirPatelCG/openenv-support/resolve/main/server/app.py
389 Bytes
| import os | |
| import sys | |
| sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from app.main import app # noqa: F401 | |
| def main(): | |
| import uvicorn | |
| port = int(os.getenv("PORT", "7860")) | |
| uvicorn.run( | |
| "server.app:app", | |
| host="0.0.0.0", | |
| port=port, | |
| workers=1, | |
| reload=False, | |
| ) | |
| if __name__ == "__main__": | |
| main() |