Spaces:
Runtime error
Runtime error
Commit
·
0771e8c
1
Parent(s):
f5aa58d
Update app.py
Browse files
app.py
CHANGED
@@ -156,8 +156,7 @@ def run():
|
|
156 |
flat_predictions = [item for sublist in predictions for item in sublist]
|
157 |
flat_predictions = np.argmax(flat_predictions, axis=1).flatten()#p = [i for i in classifier(tweet_list)]
|
158 |
df = pd.DataFrame(list(zip(tweet_list, flat_predictions)),columns =['Últimos '+ str(number_of_tweets)+' Tweets'+' de '+search_words, 'Sexista'])
|
159 |
-
df['
|
160 |
-
|
161 |
|
162 |
st.table(df.reset_index(drop=True).head(20).style.applymap(color_survived, subset=['Sexista']))
|
163 |
|
|
|
156 |
flat_predictions = [item for sublist in predictions for item in sublist]
|
157 |
flat_predictions = np.argmax(flat_predictions, axis=1).flatten()#p = [i for i in classifier(tweet_list)]
|
158 |
df = pd.DataFrame(list(zip(tweet_list, flat_predictions)),columns =['Últimos '+ str(number_of_tweets)+' Tweets'+' de '+search_words, 'Sexista'])
|
159 |
+
df['Sexista']= np.where(df['Sexista']== 0, 'No Sexistas', 'Sexistas')
|
|
|
160 |
|
161 |
st.table(df.reset_index(drop=True).head(20).style.applymap(color_survived, subset=['Sexista']))
|
162 |
|