diff --git a/build.py b/build.py index 3e7c174544f63811e2f7aadbec0eaa3668ec50df..728e346e96246af531f1e604d345bd8cbe4bbd96 100644 --- a/build.py +++ b/build.py @@ -457,10 +457,14 @@ classifier.fit(x_train_lr, y_train_lr) print("Pickling files...") -for item in ['mlb', 'vectorizer','model']: - print("Saving " + f'{item}.pickle') - with open(f'{item}.pickle', 'wb') as handle: - pickle.dump(item, handle) +with open('vectorizer.pickle', 'wb') as handle: + pickle.dump(vectorizer, handle) + +with open('mlb.pickle', 'wb') as handle: + pickle.dump(mlb, handle) + +with open('model.pickle', 'wb') as handle: + pickle.dump(model, handle) #Automatically restart the services: MAY NEED TO CHANGE TO PUSH TO GITHUB AND THEN SSHING INTO THE SERVER ETC ETC