Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ import matplotlib.pyplot as plt
|
|
| 7 |
import seaborn as sns
|
| 8 |
from matplotlib.backends.backend_agg import FigureCanvasAgg
|
| 9 |
from io import BytesIO
|
|
|
|
| 10 |
|
| 11 |
import configparser
|
| 12 |
import tweepy
|
|
@@ -14,10 +15,10 @@ import tweepy
|
|
| 14 |
config = configparser.ConfigParser()
|
| 15 |
config.read('./config.ini')
|
| 16 |
|
| 17 |
-
api_key =
|
| 18 |
-
api_key_secret =
|
| 19 |
-
access_token =
|
| 20 |
-
access_token_secret =
|
| 21 |
|
| 22 |
# Authenticate with Twitter
|
| 23 |
auth = tweepy.OAuthHandler(api_key, api_key_secret)
|
|
|
|
| 7 |
import seaborn as sns
|
| 8 |
from matplotlib.backends.backend_agg import FigureCanvasAgg
|
| 9 |
from io import BytesIO
|
| 10 |
+
import os
|
| 11 |
|
| 12 |
import configparser
|
| 13 |
import tweepy
|
|
|
|
| 15 |
config = configparser.ConfigParser()
|
| 16 |
config.read('./config.ini')
|
| 17 |
|
| 18 |
+
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)
|