Spaces:
Sleeping
Sleeping
unfinity
commited on
Commit
·
17f85a1
1
Parent(s):
6dc5be8
add health check
Browse files
api.py
CHANGED
@@ -18,6 +18,12 @@ model_pose.to(device)
|
|
18 |
|
19 |
app = FastAPI()
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
@app.post("/predict-image")
|
22 |
async def predict_image(file: UploadFile = File(...)):
|
23 |
contents = await file.read()
|
|
|
18 |
|
19 |
app = FastAPI()
|
20 |
|
21 |
+
|
22 |
+
@app.get("/_stcore/health")
|
23 |
+
async def health():
|
24 |
+
return JSONResponse(content={"status": "ok"})
|
25 |
+
|
26 |
+
|
27 |
@app.post("/predict-image")
|
28 |
async def predict_image(file: UploadFile = File(...)):
|
29 |
contents = await file.read()
|