harikrishnad1997 commited on
Commit
573a52f
·
verified ·
1 Parent(s): 45ebaae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -24,10 +24,12 @@ def is_valid_json(data):
24
  except json.JSONDecodeError:
25
  return False
26
 
 
 
27
  # Function to initialize connection to Firebase Firestore
28
  @st.cache_resource
29
  def init_connection():
30
- cred = credentials.Certificate('.streamlit/firestone-key.json')
31
  firebase_admin.initialize_app(cred)
32
  return firestore.client()
33
 
 
24
  except json.JSONDecodeError:
25
  return False
26
 
27
+ firebase_settings = st.secrets["firebase"]['my_project_settings']
28
+
29
  # Function to initialize connection to Firebase Firestore
30
  @st.cache_resource
31
  def init_connection():
32
+ cred = credentials.Certificate(json.dumps(firebase_settings))
33
  firebase_admin.initialize_app(cred)
34
  return firestore.client()
35