Spaces:
Sleeping
Sleeping
Download server/app.py from TheCrustaceans/Pm-ops: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/spaces/TheCrustaceans/Pm-ops/resolve/main/server/app.py
- Command line
-
hf download hf://spaces/TheCrustaceans/Pm-ops/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/TheCrustaceans/Pm-ops/resolve/main/server/app.py
556 Bytes
| from openenv.core.env_server.http_server import create_app | |
| from models import PMOpsAction, PMOpsObservation | |
| from server.pm_ops_environment import PMOpsEnvironment | |
| def create_environment(): | |
| return PMOpsEnvironment() | |
| app = create_app( | |
| create_environment, | |
| PMOpsAction, | |
| PMOpsObservation, | |
| env_name="pm_ops", | |
| max_concurrent_envs=8, | |
| ) | |
| def root(): | |
| return {"name": "pm_ops", "status": "running"} | |
| def main(): | |
| import uvicorn | |
| uvicorn.run(app, host="0.0.0.0", port=8000) | |
| if __name__ == "__main__": | |
| main() | |