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