Spaces:
Sleeping
Sleeping
Download server/app.py from Nithin1026/synapse-x: direct link, hf CLI and curl.
- Browser
- Download file 449 Bytes
-
https://huggingface.co/spaces/Nithin1026/synapse-x/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/Nithin1026/synapse-x/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Nithin1026/synapse-x/resolve/main/server/app.py
449 Bytes
| """ | |
| Multi-mode deployment entrypoint for SYNAPSE-X. | |
| """ | |
| import os | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |
| import uvicorn | |
| from api.app import app | |
| def main(): | |
| port = int(os.environ.get("PORT", 7860)) | |
| uvicorn.run("server.app:app", host="0.0.0.0", port=port, reload=False) | |
| if __name__ == "__main__": | |
| main() | |