Spaces:
Runtime error
Runtime error
Commit
·
144e64f
1
Parent(s):
bc014c5
Update app.py
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ def run():
|
|
107 |
|
108 |
if (error == False):
|
109 |
if (termino):
|
110 |
-
new_search = search_words
|
111 |
tweets =tw.Cursor(api.search_tweets,q=new_search,lang="es",since=date_since).items(number_of_tweets)
|
112 |
elif (usuario):
|
113 |
tweets = api.user_timeline(screen_name = search_words,count=number_of_tweets)
|
@@ -116,7 +116,7 @@ def run():
|
|
116 |
#tweet_list = [strip_undesired_chars(i.text) for i in tweets]
|
117 |
text= pd.DataFrame(tweet_list)
|
118 |
#text[0] = text[0].apply(preprocess)
|
119 |
-
text[0] = text[0].apply(
|
120 |
text1=text[0].values
|
121 |
indices1=tokenizer.batch_encode_plus(text1.tolist(),
|
122 |
max_length=128,
|
|
|
107 |
|
108 |
if (error == False):
|
109 |
if (termino):
|
110 |
+
new_search = search_words + " -filter:retweets"
|
111 |
tweets =tw.Cursor(api.search_tweets,q=new_search,lang="es",since=date_since).items(number_of_tweets)
|
112 |
elif (usuario):
|
113 |
tweets = api.user_timeline(screen_name = search_words,count=number_of_tweets)
|
|
|
116 |
#tweet_list = [strip_undesired_chars(i.text) for i in tweets]
|
117 |
text= pd.DataFrame(tweet_list)
|
118 |
#text[0] = text[0].apply(preprocess)
|
119 |
+
text[0] = text[0].apply(preprocess)
|
120 |
text1=text[0].values
|
121 |
indices1=tokenizer.batch_encode_plus(text1.tolist(),
|
122 |
max_length=128,
|