Spaces:
Build error
Build error
Download server/app.py from rupak-dev07/flight-rebooking: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/spaces/rupak-dev07/flight-rebooking/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/rupak-dev07/flight-rebooking/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/rupak-dev07/flight-rebooking/resolve/main/server/app.py
364 Bytes
| import sys | |
| from pathlib import Path | |
| # Add root dir to path so we can import 'app' and 'environment' | |
| root_dir = str(Path(__file__).resolve().parent.parent) | |
| if root_dir not in sys.path: | |
| sys.path.insert(0, root_dir) | |
| from app import app | |
| def main(): | |
| import uvicorn | |
| uvicorn.run("app:app", host="0.0.0.0", port=7860) | |
| if __name__ == "__main__": | |
| main() | |