Spaces:
Running
Running
Download server/app.py from ProthamD/api-debug-env: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/ProthamD/api-debug-env/resolve/4898dbf072ed5b8ea46fdc75291de2169497b4e6/server/app.py
- Command line
-
hf download hf://spaces/ProthamD/api-debug-env@4898dbf072ed5b8ea46fdc75291de2169497b4e6/server/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ProthamD/api-debug-env/resolve/4898dbf072ed5b8ea46fdc75291de2169497b4e6/server/app.py
632 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 | |
| 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"} | |
| def main(): | |
| import uvicorn | |
| uvicorn.run("server.app:app", host="0.0.0.0", port=7860) | |
| if __name__ == "__main__": | |
| main() | |
| if __name__ == "__main__": | |
| main() | |