Commit
·
a3d47cc
1
Parent(s):
8298371
after certain shocking findings , I have discovered a discrepancy in the value of x and predictions , becos of which now I will test my own model for the same .
Browse files
app.py
CHANGED
@@ -51,8 +51,8 @@ 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] * (
|
55 |
-
text = np.array(text).reshape(-1,
|
56 |
x = model.predict(text).tolist()[0][0]
|
57 |
return x
|
58 |
|
|
|
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, 30)
|
56 |
x = model.predict(text).tolist()[0][0]
|
57 |
return x
|
58 |
|