Spaces:
Sleeping
Sleeping
Download server/app.py from Boobesh007/runner-game: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/spaces/Boobesh007/runner-game/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/Boobesh007/runner-game/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Boobesh007/runner-game/resolve/main/server/app.py
554 Bytes
| import sys | |
| import os | |
| sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from openenv.core.env_server.http_server import create_app | |
| from models import RunnerAction, RunnerObservation | |
| from server.my_env_environment import MyEnvironment | |
| app = create_app( | |
| MyEnvironment, | |
| RunnerAction, | |
| RunnerObservation, | |
| env_name="runner_game", | |
| max_concurrent_envs=10, | |
| ) | |
| def main(host: str = "0.0.0.0", port: int = 8000): | |
| import uvicorn | |
| uvicorn.run(app, host=host, port=port) | |
| if __name__ == "__main__": | |
| main() | |