samir1120 commited on
Commit
74f810f
·
verified ·
1 Parent(s): 2685fe0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, 'wb') as file:
9
- pickle.dump(nb_classifier, file)
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])