from fastapi import FastAPI from environment.cloud_env import CloudDataJanitorEnv import uvicorn app = FastAPI() env = CloudDataJanitorEnv(task_name="easy") @app.get("/") def read_root(): # This is the endpoint Hugging Face pings to check if you are alive! return {"status": "ok", "message": "Cloud Data Janitor is running"} @app.post("/reset") def reset_env(): state = env.reset() return {"status": "ok", "state": state} # --- Bottom of server/app.py --- # Rename 'run' to 'main' def main(): import uvicorn uvicorn.run("server.app:app", host="0.0.0.0", port=7860) # Add the standard Python callable block if __name__ == "__main__": main()