curtpond commited on
Commit
48b6db6
1 Parent(s): 87806b7

Updateda app.py.

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -26,11 +26,13 @@ def process_text(text):
26
  vectorizer = CountVectorizer()
27
  def vectorize_text(text):
28
  text = process_text(text)
29
- return vectorizer.transform(text)
 
30
 
31
  # Load model from pickle file
32
  model = pickle.load(open(lr_filename, 'rb'))
33
 
 
34
  def predict(text):
35
  text = vectorize_text(text)
36
  prediction = model.predict(text)
 
26
  vectorizer = CountVectorizer()
27
  def vectorize_text(text):
28
  text = process_text(text)
29
+ text = vectorizer.fit_transform([text])
30
+ return text
31
 
32
  # Load model from pickle file
33
  model = pickle.load(open(lr_filename, 'rb'))
34
 
35
+
36
  def predict(text):
37
  text = vectorize_text(text)
38
  prediction = model.predict(text)