ghostleek commited on
Commit
fee8c08
·
verified ·
1 Parent(s): 270ff38

fix: update secrets accessing

Browse files

amend st.secrets to use os.env

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ st.set_page_config(
18
  # Function to inject Google Analytics using st.components.v1.html
19
  def inject_ga():
20
  try:
21
- GA_MEASUREMENT_ID = st.secrets["measurement_id"]
22
 
23
  # Define the Google Analytics script
24
  GA_SCRIPT = f"""
@@ -42,7 +42,7 @@ def inject_ga():
42
  inject_ga()
43
 
44
  # Initialize the Groq client
45
- GROQ_API_KEY = st.secrets["GROQ_API_KEY"]
46
  os.environ["GROQ_API_KEY"] = GROQ_API_KEY
47
  client = Groq()
48
 
 
18
  # Function to inject Google Analytics using st.components.v1.html
19
  def inject_ga():
20
  try:
21
+ GA_MEASUREMENT_ID = os.getenv["measurement_id"]
22
 
23
  # Define the Google Analytics script
24
  GA_SCRIPT = f"""
 
42
  inject_ga()
43
 
44
  # Initialize the Groq client
45
+ GROQ_API_KEY = os.getenv["GROQ_API_KEY"]
46
  os.environ["GROQ_API_KEY"] = GROQ_API_KEY
47
  client = Groq()
48