Spaces:
Runtime error
Runtime error
Commit
·
4cb688f
1
Parent(s):
4dcdda4
Update app.py
Browse files
app.py
CHANGED
@@ -108,8 +108,7 @@ def analizar_tweets(search_words, number_of_tweets ):
|
|
108 |
etiqueta= [{'Tweets': text,'Prediccion': predic['label'], 'Probabilidad': predic['score']} for predic in prediction]
|
109 |
result.append(etiqueta)
|
110 |
|
111 |
-
|
112 |
-
df = pd.DataFrame(data)
|
113 |
df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
114 |
|
115 |
tabla = st.table(df.reset_index(drop=True).head(30).style.applymap(color_survived, subset=['Prediccion']))
|
|
|
108 |
etiqueta= [{'Tweets': text,'Prediccion': predic['label'], 'Probabilidad': predic['score']} for predic in prediction]
|
109 |
result.append(etiqueta)
|
110 |
|
111 |
+
data = pd.DataFrame(result)
|
|
|
112 |
df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
|
113 |
|
114 |
tabla = st.table(df.reset_index(drop=True).head(30).style.applymap(color_survived, subset=['Prediccion']))
|