WebashalarForML commited on
Commit
048ff0a
·
verified ·
1 Parent(s): 961c40e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -81,10 +81,10 @@ os.makedirs(app.config['MODEL_FOLDER'], exist_ok=True)
81
  # Prediction analysis models loaded from Hugging Face.
82
  src_path = hf_hub_download(
83
  repo_id="WebashalarForML/Diamond_model_",
84
- filename="models_list/mkble/DecisionTree_best_pipeline_mkble_0_to_0.99_al.pkl",
85
  cache_dir=MODEL_FOLDER
86
  )
87
- dst_path = os.path.join(MODEL_FOLDER, "DecisionTree_best_pipeline_mkble_0_to_0.99_al.pkl")
88
  shutil.copy(src_path, dst_path)
89
  makable_model = load(dst_path)
90
 
@@ -265,7 +265,7 @@ def process_dataframe(df):
265
 
266
  # Create two DataFrames: one for prediction and one for classification.
267
  df_pred = df[required_columns].copy()
268
- df_pred = df_pred[(df_pred[['EngCts']] > 0.00).all(axis=1) & (df_pred[['EngCts']] <= 0.99).all(axis=1)]
269
  df_pred[['EngBlk', 'EngWht', 'EngOpen', 'EngPav']]=df_pred[['EngBlk', 'EngWht', 'EngOpen', 'EngPav']].fillna("NA")
270
  df_class = df[required_columns_2].fillna("NA").copy()
271
 
 
81
  # Prediction analysis models loaded from Hugging Face.
82
  src_path = hf_hub_download(
83
  repo_id="WebashalarForML/Diamond_model_",
84
+ filename="models_list/mkble/DecisionTree_best_pipeline_mkble_0_to_2.pkl",
85
  cache_dir=MODEL_FOLDER
86
  )
87
+ dst_path = os.path.join(MODEL_FOLDER, "DecisionTree_best_pipeline_mkble_0_to_2.pkl")
88
  shutil.copy(src_path, dst_path)
89
  makable_model = load(dst_path)
90
 
 
265
 
266
  # Create two DataFrames: one for prediction and one for classification.
267
  df_pred = df[required_columns].copy()
268
+ df_pred = df_pred[(df_pred[['EngCts']] > 0.00).all(axis=1) & (df_pred[['EngCts']] <= 2.00).all(axis=1)]
269
  df_pred[['EngBlk', 'EngWht', 'EngOpen', 'EngPav']]=df_pred[['EngBlk', 'EngWht', 'EngOpen', 'EngPav']].fillna("NA")
270
  df_class = df[required_columns_2].fillna("NA").copy()
271