Arafath10 commited on
Commit
2461ef1
·
verified ·
1 Parent(s): 1fbf289

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
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=10, n_jobs=-1, scoring='accuracy')
98
 
99
  # Fit the grid search to the data
100
  grid_search.fit(X_train, y_train)
@@ -172,4 +172,5 @@ async def your_continuous_function(page: int,paginate: int,Tenant: str):
172
 
173
  @app.get("/test_api")
174
  async def test_api():
175
- return "api_working"
 
 
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)
 
172
 
173
  @app.get("/test_api")
174
  async def test_api():
175
+ encoders = load('encoders.joblib')
176
+ xgb_model = load('xgb_model.joblib')