CoolFace
Apppublic

anushk098/no_errors_yet

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
app.py29 linesDownload Raw Back to root
1from fastapi import FastAPI
2from env import CourtroomEnv
3
4app = FastAPI()
5env = CourtroomEnv()
6
7@app.get("/")
8def home():
9    return {"status": "ok"}
10
11@app.get("/reset")
12def reset():
13    return env.reset()
14print("START: App initialization")
15
16# jab server start ho raha hai
17print("STEP: Starting server")
18
19# agar model load ho raha hai
20print("STEP: Loading model")
21
22# jab request aaye (important)
23def predict():
24    print("STEP: Running inference")
25    
26    # your logic
27    
28    print("END: Request completed")
29    return {"result": "ok"}