vallabbharath commited on
Commit
5867bd0
·
verified ·
1 Parent(s): 9a3e3c1

Force rebuild

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -7,6 +7,13 @@ import pandas as pd
7
  # Initialize Flask app
8
  app = Flask(__name__)
9
 
 
 
 
 
 
 
 
10
  # Load the saved model pipeline
11
  model = joblib.load("rf_best.joblib") # path to our saved file
12
 
 
7
  # Initialize Flask app
8
  app = Flask(__name__)
9
 
10
+ def custom_preprocessing(X):
11
+ X = X.copy()
12
+ X['Store_Age'] = 2025 - X['Store_Establishment_Year']
13
+ X.drop('Store_Establishment_Year', axis=1, inplace=True)
14
+ X['Product_Sugar_Content'] = X['Product_Sugar_Content'].replace({'reg': 'Regular'})
15
+ return X
16
+
17
  # Load the saved model pipeline
18
  model = joblib.load("rf_best.joblib") # path to our saved file
19