Spaces:
Runtime error
Runtime error
Commit
·
19f662a
1
Parent(s):
f701f7f
Update app.py
Browse files
app.py
CHANGED
@@ -116,7 +116,7 @@ def tweets_usuario(usuario, cant_de_tweets):
|
|
116 |
df.sort_values(by=['Prediccion', 'Probabilidad'], ascending=[False, False], inplace=True)
|
117 |
df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
118 |
df['Probabilidad'] = df['Probabilidad'].apply(lambda x: round(x, 3))
|
119 |
-
muestra = st.table(df.reset_index(drop=True).head(
|
120 |
tabla.append(muestra)
|
121 |
except Exception as e:
|
122 |
muestra = st.text(f"La cuenta {search_words} no existe.")
|
@@ -152,7 +152,8 @@ def tweets_localidad(buscar_localidad):
|
|
152 |
tabla.append(muestra)
|
153 |
else:
|
154 |
#tabla.append(muestra)
|
155 |
-
df.sort_values(by=['Prediccion', 'Probabilidad'], ascending=[False, False], inplace=True)
|
|
|
156 |
#df.sort_values(by='Prediccion', ascending=False, inplace=True)
|
157 |
df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
158 |
df['Probabilidad'] = df['Probabilidad'].round(3)
|
|
|
116 |
df.sort_values(by=['Prediccion', 'Probabilidad'], ascending=[False, False], inplace=True)
|
117 |
df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
118 |
df['Probabilidad'] = df['Probabilidad'].apply(lambda x: round(x, 3))
|
119 |
+
muestra = st.table(df.reset_index(drop=True).head(50).style.applymap(color_survived, subset=['Prediccion']), max_rows=9)
|
120 |
tabla.append(muestra)
|
121 |
except Exception as e:
|
122 |
muestra = st.text(f"La cuenta {search_words} no existe.")
|
|
|
152 |
tabla.append(muestra)
|
153 |
else:
|
154 |
#tabla.append(muestra)
|
155 |
+
#df.sort_values(by=['Prediccion', 'Probabilidad'], ascending=[False, False], inplace=True)
|
156 |
+
df.sort_values(by='Probabilidad', ascending=False, inplace=True)
|
157 |
#df.sort_values(by='Prediccion', ascending=False, inplace=True)
|
158 |
df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
159 |
df['Probabilidad'] = df['Probabilidad'].round(3)
|