chkp-talexm commited on
Commit
64c6c05
·
1 Parent(s): 673ecdc
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -195,6 +195,8 @@ st.info("Upload a CSV file, and the trained models will predict click probabilit
195
 
196
  catboost, xgb, rf = load_models()
197
 
 
 
198
  # Upload File
199
  uploaded_file = st.file_uploader("Upload a CSV file", type=["csv"])
200
  if uploaded_file:
@@ -202,7 +204,7 @@ if uploaded_file:
202
  st.success("File uploaded successfully!")
203
 
204
  # ✅ Compute aggregations & preprocess
205
- input_df = preprocess_input(input_df)
206
 
207
  # ✅ Make Predictions
208
  st.subheader("Predictions in Progress...")
 
195
 
196
  catboost, xgb, rf = load_models()
197
 
198
+ expected_feature_order = catboost.feature_names_
199
+ print("Expected Feature Order:", expected_feature_order)
200
  # Upload File
201
  uploaded_file = st.file_uploader("Upload a CSV file", type=["csv"])
202
  if uploaded_file:
 
204
  st.success("File uploaded successfully!")
205
 
206
  # ✅ Compute aggregations & preprocess
207
+ input_df = preprocess_input(input_df, expected_feature_order)
208
 
209
  # ✅ Make Predictions
210
  st.subheader("Predictions in Progress...")