Spaces:
Sleeping
Sleeping
Moved count vectorizer before process text in predict function.
Browse files
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 |
|