Spaces:
Runtime error
Runtime error
Download app.py from meatscalerhackathon/openenv-workplace: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/spaces/meatscalerhackathon/openenv-workplace/resolve/main/app.py
- Command line
-
hf download hf://spaces/meatscalerhackathon/openenv-workplace/app.py
-
curl -L -o app.py https://huggingface.co/spaces/meatscalerhackathon/openenv-workplace/resolve/main/app.py
383 Bytes
| from fastapi import FastAPI | |
| from inference import run | |
| app = FastAPI() | |
| def root(): | |
| return {"message": "API running"} | |
| def reset(): | |
| return {"status": "reset successful"} | |
| def infer(): | |
| try: | |
| result = run() | |
| return {"result": result} | |
| except Exception as e: | |
| return {"error": str(e)} |