Spaces:
Runtime error
Runtime error
Commit
·
2993324
1
Parent(s):
4578553
Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,7 @@ def analizar_tweets(search_words, number_of_tweets ):
|
|
139 |
df['Tweets'] = df['Tweets'].str.replace('RT|@', '')
|
140 |
#df['Tweets'] = df['Tweets'].apply(lambda x: re.sub(r'[:;][-o^]?[)\]DpP3]|[(/\\]|[\U0001f600-\U0001f64f]|[\U0001f300-\U0001f5ff]|[\U0001f680-\U0001f6ff]|[\U0001f1e0-\U0001f1ff]','', x))
|
141 |
|
142 |
-
tabla = st.table(df.reset_index(drop=True).head(
|
143 |
|
144 |
return tabla
|
145 |
|
@@ -195,7 +195,7 @@ def analizar_frase(frase):
|
|
195 |
text['Prediccion'] = np.where(text['Prediccion'] == 0 , 'No Sexista', 'Sexista')
|
196 |
|
197 |
|
198 |
-
tabla = st.table(text.reset_index(drop=True).head(
|
199 |
|
200 |
return tabla
|
201 |
|
@@ -205,7 +205,7 @@ def run():
|
|
205 |
col,buff1, buff2 = st.columns([2,2,1])
|
206 |
st.write("Escoja una Opción")
|
207 |
search_words = col.text_input("Introduzca el termino o usuario para analizar y pulse el check correspondiente")
|
208 |
-
number_of_tweets = col.number_input('Introduzca número de
|
209 |
termino=st.checkbox('Término')
|
210 |
usuario=st.checkbox('Usuario')
|
211 |
submit_button = col.form_submit_button(label='Analizar')
|
|
|
139 |
df['Tweets'] = df['Tweets'].str.replace('RT|@', '')
|
140 |
#df['Tweets'] = df['Tweets'].apply(lambda x: re.sub(r'[:;][-o^]?[)\]DpP3]|[(/\\]|[\U0001f600-\U0001f64f]|[\U0001f300-\U0001f5ff]|[\U0001f680-\U0001f6ff]|[\U0001f1e0-\U0001f1ff]','', x))
|
141 |
|
142 |
+
tabla = st.table(df.reset_index(drop=True).head(30).style.applymap(color_survived, subset=['Sexista']))
|
143 |
|
144 |
return tabla
|
145 |
|
|
|
195 |
text['Prediccion'] = np.where(text['Prediccion'] == 0 , 'No Sexista', 'Sexista')
|
196 |
|
197 |
|
198 |
+
tabla = st.table(text.reset_index(drop=True).head(30).style.applymap(color_survived, subset=['Prediccion']))
|
199 |
|
200 |
return tabla
|
201 |
|
|
|
205 |
col,buff1, buff2 = st.columns([2,2,1])
|
206 |
st.write("Escoja una Opción")
|
207 |
search_words = col.text_input("Introduzca el termino o usuario para analizar y pulse el check correspondiente")
|
208 |
+
number_of_tweets = col.number_input('Introduzca número de tweets a analizar. Máximo 50', 0,50,10)
|
209 |
termino=st.checkbox('Término')
|
210 |
usuario=st.checkbox('Usuario')
|
211 |
submit_button = col.form_submit_button(label='Analizar')
|