Spaces:
Runtime error
Runtime error
DrishtiSharma
commited on
Commit
•
de57948
1
Parent(s):
6b35d8e
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ with open('tokenizer.pickle', 'rb') as f:
|
|
15 |
|
16 |
|
17 |
def predict_sentiment(text):
|
18 |
-
sentiment = ['
|
19 |
sequence_test = tokenizer.texts_to_sequences([text])
|
20 |
padded_test = pad_sequences(sequence_test, maxlen= 52)
|
21 |
text=padded_test
|
@@ -23,7 +23,7 @@ def predict_sentiment(text):
|
|
23 |
X = [text for _ in range(len(model.input))]
|
24 |
a=model.predict(X, verbose=0)
|
25 |
return sentiment[np.around(a, decimals=0).argmax(axis=1)[0]]
|
26 |
-
description = "
|
27 |
|
28 |
|
29 |
#Gradio app
|
|
|
15 |
|
16 |
|
17 |
def predict_sentiment(text):
|
18 |
+
sentiment = ['I guess, I liked the movie, but I'm not sure it's my favorite.']
|
19 |
sequence_test = tokenizer.texts_to_sequences([text])
|
20 |
padded_test = pad_sequences(sequence_test, maxlen= 52)
|
21 |
text=padded_test
|
|
|
23 |
X = [text for _ in range(len(model.input))]
|
24 |
a=model.predict(X, verbose=0)
|
25 |
return sentiment[np.around(a, decimals=0).argmax(axis=1)[0]]
|
26 |
+
description = "Provide an opinion regarding a movie and this app will suggest what the underlying sentiment is. "
|
27 |
|
28 |
|
29 |
#Gradio app
|