Skip to content

Commit

Permalink
Revert "Try to remove the need for .streamlit/secrets.toml"
Browse files Browse the repository at this point in the history
  • Loading branch information
fnery committed May 16, 2024
1 parent 6aa7a51 commit f462e02
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions visualize/streamlit_app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import streamlit as st
from google.oauth2 import service_account
from google.cloud import bigquery
Expand All @@ -7,8 +6,11 @@
from PIL import Image


os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = './GCLOUD_SERVICE_ACCOUNT_KEY_FILE.json'
client = bigquery.Client()
# Authentication and BigQuery client setup
credentials = service_account.Credentials.from_service_account_info(
st.secrets["gcp_service_account"]
)
client = bigquery.Client(credentials=credentials)

# Cache data loading function
@st.cache_data(ttl=600)
Expand Down

0 comments on commit f462e02

Please sign in to comment.