Spaces:
Runtime error
Runtime error
Commit
·
000ea05
1
Parent(s):
9fba345
Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ with colT2:
|
|
98 |
|
99 |
def analizar_tweets(search_words, number_of_tweets ):
|
100 |
tweets = api.user_timeline(screen_name = search_words,tweet_mode="extended", count= number_of_tweets)
|
101 |
-
tweet_list = [i.
|
102 |
text= pd.DataFrame(tweet_list)
|
103 |
text[0] = text[0].apply(preprocess_tweet)
|
104 |
text_list = text[0].tolist()
|
@@ -140,7 +140,7 @@ def tweets_localidad(buscar_localidad):
|
|
140 |
location = geolocator.geocode(buscar_localidad)
|
141 |
radius = "10km"
|
142 |
tweets = api.search_tweets(q="",lang="es",geocode=f"{location.latitude},{location.longitude},{radius}", count = 50)
|
143 |
-
tweet_list = [i.
|
144 |
text= pd.DataFrame(tweet_list)
|
145 |
text[0] = text[0].apply(preprocess_tweet)
|
146 |
text_list = text[0].tolist()
|
@@ -188,7 +188,7 @@ def run():
|
|
188 |
col,buff1, buff2 = st.columns([2,2,1])
|
189 |
st.write("Escoja una Opción")
|
190 |
search_words = col.text_input("Introduzca el termino, usuario o localidad para analizar y pulse el check correspondiente")
|
191 |
-
number_of_tweets = col.number_input('Introduzca número de tweets a analizar. Máximo 50', 0,50,
|
192 |
termino=st.checkbox('Término')
|
193 |
usuario=st.checkbox('Usuario')
|
194 |
localidad=st.checkbox('Localidad')
|
|
|
98 |
|
99 |
def analizar_tweets(search_words, number_of_tweets ):
|
100 |
tweets = api.user_timeline(screen_name = search_words,tweet_mode="extended", count= number_of_tweets)
|
101 |
+
tweet_list = [i.text for i in tweets]
|
102 |
text= pd.DataFrame(tweet_list)
|
103 |
text[0] = text[0].apply(preprocess_tweet)
|
104 |
text_list = text[0].tolist()
|
|
|
140 |
location = geolocator.geocode(buscar_localidad)
|
141 |
radius = "10km"
|
142 |
tweets = api.search_tweets(q="",lang="es",geocode=f"{location.latitude},{location.longitude},{radius}", count = 50)
|
143 |
+
tweet_list = [i.text for i in tweets]
|
144 |
text= pd.DataFrame(tweet_list)
|
145 |
text[0] = text[0].apply(preprocess_tweet)
|
146 |
text_list = text[0].tolist()
|
|
|
188 |
col,buff1, buff2 = st.columns([2,2,1])
|
189 |
st.write("Escoja una Opción")
|
190 |
search_words = col.text_input("Introduzca el termino, usuario o localidad para analizar y pulse el check correspondiente")
|
191 |
+
number_of_tweets = col.number_input('Introduzca número de tweets a analizar. Máximo 50', 0,50,0)
|
192 |
termino=st.checkbox('Término')
|
193 |
usuario=st.checkbox('Usuario')
|
194 |
localidad=st.checkbox('Localidad')
|