Spaces:
Runtime error
Runtime error
Commit
·
af06d05
1
Parent(s):
9b7f323
Update app.py
Browse files
app.py
CHANGED
@@ -175,7 +175,7 @@ def tweets_localidad(buscar_localidad):
|
|
175 |
|
176 |
def analizar_frase(frase):
|
177 |
|
178 |
-
if
|
179 |
predictions = pipeline_nlp(frase)
|
180 |
# convierte las predicciones en una lista de diccionarios
|
181 |
data = [{'Texto': frase, 'Prediccion': prediction['label'], 'Probabilidad': prediction['score']} for prediction in predictions]
|
|
|
175 |
|
176 |
def analizar_frase(frase):
|
177 |
|
178 |
+
if len(frase) == 0:
|
179 |
predictions = pipeline_nlp(frase)
|
180 |
# convierte las predicciones en una lista de diccionarios
|
181 |
data = [{'Texto': frase, 'Prediccion': prediction['label'], 'Probabilidad': prediction['score']} for prediction in predictions]
|