Spaces:
Sleeping
Sleeping
Download server/app.py from exploring-solver/my-env: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/spaces/exploring-solver/my-env/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/exploring-solver/my-env/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/exploring-solver/my-env/resolve/main/server/app.py
368 Bytes
| """Validator-friendly server entrypoint for SupportEnv.""" | |
| from __future__ import annotations | |
| import os | |
| import uvicorn | |
| def main() -> None: | |
| """Launch the FastAPI app on the Hugging Face expected host/port.""" | |
| port = int(os.environ.get("PORT", "7860")) | |
| uvicorn.run("app:app", host="0.0.0.0", port=port, workers=1) | |
| if __name__ == "__main__": | |
| main() | |