Spaces:
Runtime error
Runtime error
Commit
·
6715a95
1
Parent(s):
0b38e46
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ with open('tokenizer.pickle', 'rb') as f:
|
|
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=
|
21 |
text=padded_test
|
22 |
model = from_pretrained_keras("keras-io/bidirectional-lstm-imdb")
|
23 |
X = [text for _ in range(len(model.input))]
|
|
|
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= 64)
|
21 |
text=padded_test
|
22 |
model = from_pretrained_keras("keras-io/bidirectional-lstm-imdb")
|
23 |
X = [text for _ in range(len(model.input))]
|