Harsh7817 commited on
Commit
3933765
·
1 Parent(s): 508dbb9

Add health check endpoint

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -30,6 +30,10 @@ def update_job_status(job_id: str, state: str, detail: str = "", result: str = "
30
  "result": result
31
  }
32
 
 
 
 
 
33
  @app.post("/upload/")
34
  async def upload_image(background_tasks: BackgroundTasks, file: UploadFile = File(...)):
35
  # Basic validation
 
30
  "result": result
31
  }
32
 
33
+ @app.get("/health")
34
+ def health_check():
35
+ return {"status": "ok"}
36
+
37
  @app.post("/upload/")
38
  async def upload_image(background_tasks: BackgroundTasks, file: UploadFile = File(...)):
39
  # Basic validation