Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,7 @@ api_key = os.environ.get('api_key')
|
|
19 |
api_key_secret = os.environ.get('api_key_secret')
|
20 |
access_token = os.environ.get('access_token')
|
21 |
access_token_secret = os.environ.get('access_token_secret')
|
|
|
22 |
|
23 |
# Authenticate with Twitter
|
24 |
auth = tweepy.OAuthHandler(api_key, api_key_secret)
|
@@ -112,7 +113,7 @@ def sentiment_analysis(tweets,topic):
|
|
112 |
|
113 |
|
114 |
API_URL = "https://api-inference.huggingface.co/models/cardiffnlp/twitter-roberta-base-sentiment"
|
115 |
-
headers = {"Authorization":
|
116 |
|
117 |
print(len(tweet_procs))
|
118 |
|
|
|
19 |
api_key_secret = os.environ.get('api_key_secret')
|
20 |
access_token = os.environ.get('access_token')
|
21 |
access_token_secret = os.environ.get('access_token_secret')
|
22 |
+
huggingFaceAuth = os.environ.get('Huggingface_Authorization')
|
23 |
|
24 |
# Authenticate with Twitter
|
25 |
auth = tweepy.OAuthHandler(api_key, api_key_secret)
|
|
|
113 |
|
114 |
|
115 |
API_URL = "https://api-inference.huggingface.co/models/cardiffnlp/twitter-roberta-base-sentiment"
|
116 |
+
headers = {"Authorization": huggingFaceAuth}
|
117 |
|
118 |
print(len(tweet_procs))
|
119 |
|