Spaces:
Running
Running
Download server/app.py from srikrishna2005/openenv: direct link, hf CLI and curl.
- Browser
- Download file 723 Bytes
-
https://huggingface.co/spaces/srikrishna2005/openenv/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/srikrishna2005/openenv/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/srikrishna2005/openenv/resolve/main/server/app.py
723 Bytes
| """ | |
| Entry point for OpenEnv multi-mode deployment. | |
| This module provides the server entry point required by the OpenEnv | |
| framework for multi-mode deployment (Docker, uv run server, Python module). | |
| """ | |
| from __future__ import annotations | |
| import os | |
| import sys | |
| # Ensure the repo root is on the Python path so we can import app.py | |
| _repo_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| if _repo_root not in sys.path: | |
| sys.path.insert(0, _repo_root) | |
| def main() -> None: | |
| """Start the SENTINEL OpenEnv server.""" | |
| import uvicorn # noqa: PLC0415 | |
| port = int(os.environ.get("PORT", 7860)) | |
| uvicorn.run("app:app", host="0.0.0.0", port=port, reload=False) | |
| if __name__ == "__main__": | |
| main() | |