Sambhavnoobcoder commited on
Commit
eed7773
·
1 Parent(s): 4c7535b

model size expected (none,30) found (none,200).

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ def get_sentiment(text):
51
  text = [stemmer.lemmatize(word) for word in text]
52
  text = ' '.join(text)
53
  text = tokenizer.texts_to_sequences([text])[0]
54
- text += [0] * (200 - len(text))
55
  text = np.array(text).reshape(-1, 200)
56
  x = model.predict(text).tolist()[0][0]
57
  return ('Positive' if x >= 0.5 else 'negative') + ' sentiment!'
 
51
  text = [stemmer.lemmatize(word) for word in text]
52
  text = ' '.join(text)
53
  text = tokenizer.texts_to_sequences([text])[0]
54
+ text += [0] * (30 - len(text))
55
  text = np.array(text).reshape(-1, 200)
56
  x = model.predict(text).tolist()[0][0]
57
  return ('Positive' if x >= 0.5 else 'negative') + ' sentiment!'