MAZEN00 commited on
Commit
3c606cf
·
verified ·
1 Parent(s): b9370c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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()])