Spaces:
Runtime error
Runtime error
Commit
·
810ff52
1
Parent(s):
f5552ba
Modificaciones de interfaz
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ with colT1:
|
|
88 |
st.markdown(""" <style> .font2 {
|
89 |
font-size:16px ; font-family: 'Times New Roman'; color: #181618;}
|
90 |
</style> """, unsafe_allow_html=True)
|
91 |
-
st.markdown('<p class="font2">La presente
|
92 |
|
93 |
with open("style.css") as f:
|
94 |
st.markdown(f"<style>{f.read()}</style>",unsafe_allow_html=True)
|
@@ -100,16 +100,16 @@ def run():
|
|
100 |
|
101 |
with col1:
|
102 |
myform = st.form(key='Introduzca Texto')
|
103 |
-
search_words = myform.text_input("Introduzca el
|
104 |
number_of_tweets = myform.number_input('Introduzca número de tweets a analizar. Máximo 50', 0,50,10)
|
105 |
-
filtro=myform.radio("Seleccione la opcion para filtrar",('
|
106 |
|
107 |
|
108 |
submit_button = myform.form_submit_button(label='Analizar')
|
109 |
|
110 |
if submit_button:
|
111 |
|
112 |
-
if (filtro=='
|
113 |
new_search = search_words + " -filter:retweets"
|
114 |
tweets =tw.Cursor(api.search_tweets,q=new_search,lang="es",tweet_mode="extended").items(number_of_tweets)
|
115 |
|
@@ -174,10 +174,4 @@ except KeyError:
|
|
174 |
cole,cole1,cole2 = st.columns([3,3,2])
|
175 |
|
176 |
with cole1:
|
177 |
-
st.error('Termino no encontrado ⚠️', icon="⚠️")
|
178 |
-
|
179 |
-
except tw.errors.NotFound:
|
180 |
-
coleu,coleu1,coleu2 = st.columns([3,3,2])
|
181 |
-
|
182 |
-
with coleu1:
|
183 |
-
st.error('El usuario ingresados es incorrecto ⚠️', icon="⚠️")
|
|
|
88 |
st.markdown(""" <style> .font2 {
|
89 |
font-size:16px ; font-family: 'Times New Roman'; color: #181618;}
|
90 |
</style> """, unsafe_allow_html=True)
|
91 |
+
st.markdown('<p class="font2">La presente herramienta utiliza tweepy para descargar tweets de twitter en base a la información de entrada y procesa los tweets usando el modelo de lenguaje entrenado para identificar tweets que representan violencia política de género. Los tweets recolectados y su correspondiente clasificación se almacenan en un dataframe que se muestra como resultado final.</p>',unsafe_allow_html=True)
|
92 |
|
93 |
with open("style.css") as f:
|
94 |
st.markdown(f"<style>{f.read()}</style>",unsafe_allow_html=True)
|
|
|
100 |
|
101 |
with col1:
|
102 |
myform = st.form(key='Introduzca Texto')
|
103 |
+
search_words = myform.text_input("Introduzca el término o usuario para analizar y pulse el check correspondiente")
|
104 |
number_of_tweets = myform.number_input('Introduzca número de tweets a analizar. Máximo 50', 0,50,10)
|
105 |
+
filtro=myform.radio("Seleccione la opcion para filtrar por término o usuario",('Término', 'Usuario'))
|
106 |
|
107 |
|
108 |
submit_button = myform.form_submit_button(label='Analizar')
|
109 |
|
110 |
if submit_button:
|
111 |
|
112 |
+
if (filtro=='Término'):
|
113 |
new_search = search_words + " -filter:retweets"
|
114 |
tweets =tw.Cursor(api.search_tweets,q=new_search,lang="es",tweet_mode="extended").items(number_of_tweets)
|
115 |
|
|
|
174 |
cole,cole1,cole2 = st.columns([3,3,2])
|
175 |
|
176 |
with cole1:
|
177 |
+
st.error('Termino no encontrado ⚠️', icon="⚠️")
|
|
|
|
|
|
|
|
|
|
|
|