File size: 673 Bytes
8c16d43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d02e2f9
 
 
 
0264810
d02e2f9
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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()