Arafath10 commited on
Commit
8e25bbd
1 Parent(s): ef53f68

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -94,7 +94,7 @@ def train_the_model(data):
94
  xgb = XGBClassifier(use_label_encoder=False, eval_metric='logloss')
95
 
96
  # Setup GridSearchCV
97
- grid_search = GridSearchCV(xgb, param_grid, cv=2, n_jobs=-1, scoring='accuracy')
98
 
99
  # Fit the grid search to the data
100
  grid_search.fit(X_train, y_train)
@@ -196,8 +196,8 @@ def predict(
196
 
197
  try:
198
  # Load your trained model and encoders
199
- xgb_model = load('transexpress_xgb_model_v11.joblib')
200
- encoders = load('transexpress_encoders_v11.joblib')
201
  except:
202
  return {"no model found so first trained the model using data fecther"}
203
 
 
94
  xgb = XGBClassifier(use_label_encoder=False, eval_metric='logloss')
95
 
96
  # Setup GridSearchCV
97
+ grid_search = GridSearchCV(xgb, param_grid, cv=40, n_jobs=-1, scoring='accuracy')
98
 
99
  # Fit the grid search to the data
100
  grid_search.fit(X_train, y_train)
 
196
 
197
  try:
198
  # Load your trained model and encoders
199
+ xgb_model = load('transexpress_xgb_model.joblib')
200
+ encoders = load('transexpress_encoders.joblib')
201
  except:
202
  return {"no model found so first trained the model using data fecther"}
203