Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import pickle
|
|
| 5 |
filename = 'sentiment_model.pkl'
|
| 6 |
|
| 7 |
# Open the file in write binary ('wb') mode and save the model using pickle.dump()
|
| 8 |
-
with open(filename, '
|
| 9 |
-
pickle.
|
| 10 |
|
| 11 |
def predict_sentiment(text_input):
|
| 12 |
text_vector = vectorizer.transform([text])
|
|
|
|
| 5 |
filename = 'sentiment_model.pkl'
|
| 6 |
|
| 7 |
# Open the file in write binary ('wb') mode and save the model using pickle.dump()
|
| 8 |
+
with open(filename, 'rb') as file:
|
| 9 |
+
nb_classifier=pickle.load(file)
|
| 10 |
|
| 11 |
def predict_sentiment(text_input):
|
| 12 |
text_vector = vectorizer.transform([text])
|