Update app.py
Browse files
app.py
CHANGED
|
@@ -45,3 +45,8 @@ async def predict_player(file: UploadFile = File(...)):
|
|
| 45 |
detections = run_detection(player_model, temp_path)
|
| 46 |
os.remove(temp_path)
|
| 47 |
return JSONResponse({"model": "player", "detections": detections})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
detections = run_detection(player_model, temp_path)
|
| 46 |
os.remove(temp_path)
|
| 47 |
return JSONResponse({"model": "player", "detections": detections})
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
@app.get("/")
|
| 51 |
+
def home():
|
| 52 |
+
return JSONResponse({"message": "Server running. Use /predict/player or /predict/field endpoints."})
|