Spaces:
Runtime error
Runtime error
Commit
·
33f003a
1
Parent(s):
20e5edc
Update app.py
Browse files
app.py
CHANGED
@@ -210,7 +210,7 @@ def tweets_localidad(buscar_localidad):
|
|
210 |
return tabla
|
211 |
|
212 |
def analizar_frase(frase):
|
213 |
-
language = detect(
|
214 |
if frase == "":
|
215 |
tabla = st.text("Ingrese una frase")
|
216 |
#st.text("Ingrese una frase")
|
@@ -222,7 +222,9 @@ def analizar_frase(frase):
|
|
222 |
df = pd.DataFrame(data)
|
223 |
df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
224 |
# muestra el DataFrame
|
225 |
-
tabla = st.table(df.reset_index(drop=True).head(
|
|
|
|
|
226 |
|
227 |
return tabla
|
228 |
|
|
|
210 |
return tabla
|
211 |
|
212 |
def analizar_frase(frase):
|
213 |
+
language = detect(frase)
|
214 |
if frase == "":
|
215 |
tabla = st.text("Ingrese una frase")
|
216 |
#st.text("Ingrese una frase")
|
|
|
222 |
df = pd.DataFrame(data)
|
223 |
df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
224 |
# muestra el DataFrame
|
225 |
+
tabla = st.table(df.reset_index(drop=True).head(1).style.applymap(color_survived, subset=['Prediccion']))
|
226 |
+
else:
|
227 |
+
tabla = st.text("Solo Frase en español")
|
228 |
|
229 |
return tabla
|
230 |
|