swaraj shinde commited on
Commit
eaaeecf
·
1 Parent(s): 5712b62
model_interface/__pycache__/a_1_sales_forecasting_vegpro.cpython-312.pyc CHANGED
Binary files a/model_interface/__pycache__/a_1_sales_forecasting_vegpro.cpython-312.pyc and b/model_interface/__pycache__/a_1_sales_forecasting_vegpro.cpython-312.pyc differ
 
model_interface/a_1_sales_forecasting_vegpro.py CHANGED
@@ -8,18 +8,18 @@ from model_interface.hf_model_store import get_artifact_path
8
  # Load Weekly Model
9
  # ---------------------------
10
  def load_weekly_model():
11
- model = joblib.load(get_artifact_path("model_files/1_sales_forecasting_vegpro/weekly/week_best_model.joblib"))
12
- scaler = joblib.load(get_artifact_path("model_files/1_sales_forecasting_vegpro/weekly/week_scaler.joblib"))
13
- label_enc = joblib.load(get_artifact_path("model_files/1_sales_forecasting_vegpro/weekly/week_label_encoder.joblib"))
14
  return model, scaler, label_enc
15
 
16
  # ---------------------------
17
  # Load Monthly Model
18
  # ---------------------------
19
  def load_monthly_model():
20
- model = joblib.load(get_artifact_path("model_files/1_sales_forecasting_vegpro/monthly/month_best_model.joblib"))
21
- scaler = joblib.load(get_artifact_path("model_files/1_sales_forecasting_vegpro/monthly/month_scaler.joblib"))
22
- label_enc = joblib.load(get_artifact_path("model_files/1_sales_forecasting_vegpro/monthly/month_label_encoder.joblib"))
23
  return model, scaler, label_enc
24
 
25
  # ---------------------------
 
8
  # Load Weekly Model
9
  # ---------------------------
10
  def load_weekly_model():
11
+ model = joblib.load(get_artifact_path("1_sales_forecasting_vegpro/weekly/week_best_model.joblib"))
12
+ scaler = joblib.load(get_artifact_path("1_sales_forecasting_vegpro/weekly/week_scaler.joblib"))
13
+ label_enc = joblib.load(get_artifact_path("1_sales_forecasting_vegpro/weekly/week_label_encoder.joblib"))
14
  return model, scaler, label_enc
15
 
16
  # ---------------------------
17
  # Load Monthly Model
18
  # ---------------------------
19
  def load_monthly_model():
20
+ model = joblib.load(get_artifact_path("1_sales_forecasting_vegpro/monthly/month_best_model.joblib"))
21
+ scaler = joblib.load(get_artifact_path("1_sales_forecasting_vegpro/monthly/month_scaler.joblib"))
22
+ label_enc = joblib.load(get_artifact_path("1_sales_forecasting_vegpro/monthly/month_label_encoder.joblib"))
23
  return model, scaler, label_enc
24
 
25
  # ---------------------------
model_interface/a_2_banana_harvest_forecasting.py CHANGED
@@ -6,9 +6,9 @@ from model_interface.hf_model_store import get_artifact_path
6
 
7
  @st.cache_resource
8
  def load_files():
9
- best_model = joblib.load(get_artifact_path("model_files/2_banana_harvest_forecasting/best_regression_model.joblib"))
10
- scaler = joblib.load(get_artifact_path("model_files/2_banana_harvest_forecasting/banana_scale.joblib"))
11
- label_enc = joblib.load(get_artifact_path("model_files/2_banana_harvest_forecasting/banana_label.joblib"))
12
  return best_model, scaler, label_enc
13
 
14
  best_model, scaler, label_enc = load_files()
 
6
 
7
  @st.cache_resource
8
  def load_files():
9
+ best_model = joblib.load(get_artifact_path("2_banana_harvest_forecasting/best_regression_model.joblib"))
10
+ scaler = joblib.load(get_artifact_path("2_banana_harvest_forecasting/banana_scale.joblib"))
11
+ label_enc = joblib.load(get_artifact_path("2_banana_harvest_forecasting/banana_label.joblib"))
12
  return best_model, scaler, label_enc
13
 
14
  best_model, scaler, label_enc = load_files()
model_interface/a_3_customer_scoring_vegpro.py CHANGED
@@ -8,8 +8,8 @@ def run_sales_score_app():
8
  # -----------------------------
9
  # Load model + scaler
10
  # -----------------------------
11
- best_model = joblib.load(get_artifact_path("model_files/3_customer_scoring_vegpro/top_1_model_Gradient_Boosting.joblib"))
12
- scaler = joblib.load(get_artifact_path("model_files/3_customer_scoring_vegpro/scale.joblib"))
13
 
14
  # -----------------------------
15
  # UI
 
8
  # -----------------------------
9
  # Load model + scaler
10
  # -----------------------------
11
+ best_model = joblib.load(get_artifact_path("3_customer_scoring_vegpro/top_1_model_Gradient_Boosting.joblib"))
12
+ scaler = joblib.load(get_artifact_path("3_customer_scoring_vegpro/scale.joblib"))
13
 
14
  # -----------------------------
15
  # UI