Spaces:
Sleeping
Sleeping
Download app.py from disha2005/data-cleaning-env-final: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/spaces/disha2005/data-cleaning-env-final/resolve/main/app.py
- Command line
-
hf download hf://spaces/disha2005/data-cleaning-env-final/app.py
-
curl -L -o app.py https://huggingface.co/spaces/disha2005/data-cleaning-env-final/resolve/main/app.py
404 Bytes
| from fastapi import FastAPI | |
| from env.environment import DataCleaningEnv | |
| app = FastAPI() # 🔥 MUST BE BEFORE @app | |
| env = DataCleaningEnv(task=1) | |
| def reset(): | |
| return env.reset() | |
| def step(action: dict): | |
| obs, reward, done, _ = env.step(action) | |
| return {"obs": obs, "reward": reward, "done": done} | |
| def state(): | |
| return env.state() |