Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -63,6 +63,12 @@ class PlayerInput(BaseModel):
|
|
| 63 |
# -----------------------------
|
| 64 |
# Prediction endpoint
|
| 65 |
# -----------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
@app.post("/predict")
|
| 67 |
def predict(player: PlayerInput):
|
| 68 |
data = pd.DataFrame([player.dict()])
|
|
|
|
| 63 |
# -----------------------------
|
| 64 |
# Prediction endpoint
|
| 65 |
# -----------------------------
|
| 66 |
+
|
| 67 |
+
@app.get("/")
|
| 68 |
+
def read_root():
|
| 69 |
+
return {"message": "Welcome to Player Rating API! Use /predict to get predictions."}
|
| 70 |
+
|
| 71 |
+
|
| 72 |
@app.post("/predict")
|
| 73 |
def predict(player: PlayerInput):
|
| 74 |
data = pd.DataFrame([player.dict()])
|