KB-Infinity-Tech commited on
Commit
cd71796
·
verified ·
1 Parent(s): f1b5844

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +9 -1
src/streamlit_app.py CHANGED
@@ -14,8 +14,16 @@ from pricer import (
14
  # -----------------------------
15
  # LOAD TRAINED ML MODEL
16
  # -----------------------------
17
- ml_model = joblib.load("demand_model.pkl")
 
 
 
 
 
 
 
18
 
 
19
  def ml_predict(price, age_hours, comp_avg, product_encoded):
20
  X = pd.DataFrame([[
21
  price,
 
14
  # -----------------------------
15
  # LOAD TRAINED ML MODEL
16
  # -----------------------------
17
+ # ml_model = joblib.load("demand_model.pkl")
18
+ import joblib
19
+ from huggingface_hub import hf_hub_download
20
+
21
+ model_path = hf_hub_download(
22
+ repo_id="KB-Infinity-Tech/AIMSRICHackatonday1XGboostTrainedmodel",
23
+ filename="demand_model.pkl"
24
+ )
25
 
26
+ ml_model = joblib.load(model_path)
27
  def ml_predict(price, age_hours, comp_avg, product_encoded):
28
  X = pd.DataFrame([[
29
  price,