Spaces:
Sleeping
Sleeping
oscarvillafuerte
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def reviewnueva(review, word_index, maximo_num_palabras):
|
|
19 |
def predict_sentimiento(review):
|
20 |
sequence = reviewnueva(review, word_index, maximo_num_palabras)
|
21 |
nuevareviewpad = tf.keras.preprocessing.sequence.pad_sequences([sequence], maxlen= 100)
|
22 |
-
prediccion = model.predict(
|
23 |
if prediccion[0][0]>=0.5 :
|
24 |
sentimiento = "Positivo"
|
25 |
else:
|
|
|
19 |
def predict_sentimiento(review):
|
20 |
sequence = reviewnueva(review, word_index, maximo_num_palabras)
|
21 |
nuevareviewpad = tf.keras.preprocessing.sequence.pad_sequences([sequence], maxlen= 100)
|
22 |
+
prediccion = model.predict(nuevareviewpad)
|
23 |
if prediccion[0][0]>=0.5 :
|
24 |
sentimiento = "Positivo"
|
25 |
else:
|