DataMine commited on
Commit
831c2f3
·
verified ·
1 Parent(s): 8d7119b

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -4
src/streamlit_app.py CHANGED
@@ -23,7 +23,6 @@ st.set_page_config(
23
  def load_custom_css():
24
  st.markdown("""
25
  <style>
26
-
27
  /* Import Google Fonts */
28
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');
29
 
@@ -362,10 +361,9 @@ class MathOlympiadExam:
362
  def _initialize_groq_client(self) -> Optional[Groq]:
363
  """Initialize Groq client with API key"""
364
  try:
365
- # Use Streamlit secrets for secure API key management
366
- api_key = "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"
367
  if not api_key:
368
- st.error("⚠️ GROQ_API_KEY not found in secrets!")
369
  return None
370
  return Groq(api_key=api_key)
371
  except Exception as e:
 
23
  def load_custom_css():
24
  st.markdown("""
25
  <style>
 
26
  /* Import Google Fonts */
27
  @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');
28
 
 
361
  def _initialize_groq_client(self) -> Optional[Groq]:
362
  """Initialize Groq client with API key"""
363
  try:
364
+ api_key = os.getenv("GROQ_API_KEY")
 
365
  if not api_key:
366
+ st.error("⚠️ GROQ_API_KEY not found!")
367
  return None
368
  return Groq(api_key=api_key)
369
  except Exception as e: