Spaces:
Sleeping
Sleeping
Download server/app.py from ProthamD/api-debug-env: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/spaces/ProthamD/api-debug-env/resolve/06ca7e4ceb1507d3a1d4d1eb7f104caef29ce7e7/server/app.py
- Command line
-
hf download hf://spaces/ProthamD/api-debug-env@06ca7e4ceb1507d3a1d4d1eb7f104caef29ce7e7/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ProthamD/api-debug-env/resolve/06ca7e4ceb1507d3a1d4d1eb7f104caef29ce7e7/server/app.py
491 Bytes
| from fastapi import FastAPI | |
| from openenv.core.env_server import create_app | |
| from models import APIAction, APIObservation | |
| from server.api_debug_environment import APIDebugEnvironment | |
| from server.mock_api import router as mock_router | |
| # Pass the CLASS not an instance | |
| app = create_app(APIDebugEnvironment, APIAction, APIObservation, env_name="api_debug_env") | |
| app.include_router(mock_router) | |
| async def health(): | |
| return {"status": "ok", "environment": "api-debug-env"} |