curtpond commited on
Commit
0e46e88
·
1 Parent(s): e84b099

Moved count vectorizer before process text in predict function.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,8 +42,8 @@ def predict(text):
42
  # Load the pickled model
43
  filename = 'lr_021223.pkl'
44
  loaded_model = pickle.load(open(filename, 'rb'))
45
- text = process_text(text)
46
  text = vec.transform([text])
 
47
  prediction = loaded_model.predict(text)
48
  return prediction
49
 
 
42
  # Load the pickled model
43
  filename = 'lr_021223.pkl'
44
  loaded_model = pickle.load(open(filename, 'rb'))
 
45
  text = vec.transform([text])
46
+ text = process_text(text)
47
  prediction = loaded_model.predict(text)
48
  return prediction
49