Spaces:
Sleeping
Sleeping
Updated app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import re
|
|
| 4 |
import streamlit as st
|
| 5 |
import plotly.graph_objects as go
|
| 6 |
from google.cloud import storage
|
| 7 |
-
from google.
|
| 8 |
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
|
| 9 |
from scipy.ndimage import gaussian_filter1d
|
| 10 |
from datetime import timedelta, datetime
|
|
@@ -12,9 +12,10 @@ from datetime import timedelta, datetime
|
|
| 12 |
gcp_credentials = os.getenv('GCP_CREDENTIALS')
|
| 13 |
credentials_dict = json.loads(gcp_credentials)
|
| 14 |
|
| 15 |
-
creds =
|
| 16 |
|
| 17 |
client = storage.Client(credentials=creds)
|
|
|
|
| 18 |
bucket_name = "kapnotes"
|
| 19 |
bucket = client.bucket(bucket_name)
|
| 20 |
|
|
|
|
| 4 |
import streamlit as st
|
| 5 |
import plotly.graph_objects as go
|
| 6 |
from google.cloud import storage
|
| 7 |
+
from google.oauth2 import service_account
|
| 8 |
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
|
| 9 |
from scipy.ndimage import gaussian_filter1d
|
| 10 |
from datetime import timedelta, datetime
|
|
|
|
| 12 |
gcp_credentials = os.getenv('GCP_CREDENTIALS')
|
| 13 |
credentials_dict = json.loads(gcp_credentials)
|
| 14 |
|
| 15 |
+
creds = service_account.Credentials.from_service_account_info(credentials_dict)
|
| 16 |
|
| 17 |
client = storage.Client(credentials=creds)
|
| 18 |
+
|
| 19 |
bucket_name = "kapnotes"
|
| 20 |
bucket = client.bucket(bucket_name)
|
| 21 |
|