fixed keywords
Browse files
app.py
CHANGED
@@ -38,12 +38,7 @@ client = tweepy.Client(bearer_token=bearer_token)
|
|
38 |
nlp = spacy.load('en_core_web_lg')
|
39 |
print('hi')
|
40 |
|
41 |
-
def scrape(
|
42 |
-
if len(keyword_list) > 1:
|
43 |
-
keywords = '(' + ' OR '.join(keyword_list) + ')'
|
44 |
-
else:
|
45 |
-
keywords = keyword_list[0]
|
46 |
-
|
47 |
query = keywords + ' (lang:en OR lang:tl) -is:retweet'
|
48 |
max_results = 100
|
49 |
tweet_fields=['geo', 'id', 'lang', 'created_at']
|
@@ -513,9 +508,12 @@ def main(dataset, model):
|
|
513 |
"taft"
|
514 |
]
|
515 |
keyword_list = dataset.split(',')
|
516 |
-
|
|
|
|
|
|
|
517 |
if dataset in examples:
|
518 |
-
df = get_example(
|
519 |
place_data = 'test'
|
520 |
else:
|
521 |
print(dataset)
|
|
|
38 |
nlp = spacy.load('en_core_web_lg')
|
39 |
print('hi')
|
40 |
|
41 |
+
def scrape(keywords):
|
|
|
|
|
|
|
|
|
|
|
42 |
query = keywords + ' (lang:en OR lang:tl) -is:retweet'
|
43 |
max_results = 100
|
44 |
tweet_fields=['geo', 'id', 'lang', 'created_at']
|
|
|
508 |
"taft"
|
509 |
]
|
510 |
keyword_list = dataset.split(',')
|
511 |
+
if len(keyword_list) > 1:
|
512 |
+
keywords = '(' + ' OR '.join(keyword_list) + ')'
|
513 |
+
else:
|
514 |
+
keywords = keyword_list[0]
|
515 |
if dataset in examples:
|
516 |
+
df = get_example(keywords)
|
517 |
place_data = 'test'
|
518 |
else:
|
519 |
print(dataset)
|