Commit
·
e5c3564
1
Parent(s):
eed7773
fun fact , you can't reshape an array of size 30 into size 200
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def get_sentiment(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,
|
56 |
x = model.predict(text).tolist()[0][0]
|
57 |
return ('Positive' if x >= 0.5 else 'negative') + ' sentiment!'
|
58 |
|
|
|
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, 30)
|
56 |
x = model.predict(text).tolist()[0][0]
|
57 |
return ('Positive' if x >= 0.5 else 'negative') + ' sentiment!'
|
58 |
|