MAZEN00 commited on
Commit
804ff01
·
verified ·
1 Parent(s): 7790bd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -5,6 +5,8 @@ from huggingface_hub import hf_hub_download
5
  import joblib
6
  import pandas as pd
7
  import os
 
 
8
 
9
  # -----------------------------
10
  # Fix cache directory (use /tmp to avoid PermissionError)
@@ -67,3 +69,8 @@ def predict(player: PlayerInput):
67
  data = data.reindex(columns=model_columns, fill_value=0)
68
  prediction = model.predict(data)[0]
69
  return {"prediction": int(prediction)}
 
 
 
 
 
 
5
  import joblib
6
  import pandas as pd
7
  import os
8
+ import uvicorn
9
+
10
 
11
  # -----------------------------
12
  # Fix cache directory (use /tmp to avoid PermissionError)
 
69
  data = data.reindex(columns=model_columns, fill_value=0)
70
  prediction = model.predict(data)[0]
71
  return {"prediction": int(prediction)}
72
+
73
+
74
+ if __name__ == "__main__":
75
+ uvicorn.run("app:app", host="0.0.0.0", port=7860)
76
+