Gyimah3 commited on
Commit
f597467
·
1 Parent(s): 9414abf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -204,14 +204,15 @@ if submitted:
204
 
205
 
206
  # Getting date Features
 
207
  processed_data= getDateFeatures(df, 'date')
208
  processed_data= processed_data.drop(columns=['date'])
209
 
210
  # Encoding Categorical Variables
211
- # encoder = preprocessing.LabelEncoder()
212
  cols = ['family', 'city', 'state', 'store_type', 'locale', 'locale_name', 'day_type']
213
  for col in cols:
214
- processed_data[cols] = encoder.fit_transform(processed_data[cols])
215
 
216
  # Making Predictions
217
  def predict(X, model= Loaded_object['model']):
 
204
 
205
 
206
  # Getting date Features
207
+ # Getting date Features
208
  processed_data= getDateFeatures(df, 'date')
209
  processed_data= processed_data.drop(columns=['date'])
210
 
211
  # Encoding Categorical Variables
212
+ encoder = preprocessing.LabelEncoder()
213
  cols = ['family', 'city', 'state', 'store_type', 'locale', 'locale_name', 'day_type']
214
  for col in cols:
215
+ processed_data[col] = encoder.fit_transform(processed_data[col])
216
 
217
  # Making Predictions
218
  def predict(X, model= Loaded_object['model']):