Al1Abdullah commited on
Commit
5202f44
·
verified ·
1 Parent(s): bcc16fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -6,13 +6,8 @@ from groq import Groq
6
  import os
7
 
8
  # --- Groq API Key Handling ---
9
- GROQ_CONFIG = 'groq_config.json'
10
  def get_groq_api_key():
11
- if os.path.exists(GROQ_CONFIG):
12
- with open(GROQ_CONFIG, 'r') as f:
13
- config = json.load(f)
14
- return config.get('GROQ_API_KEY', '')
15
- return ''
16
 
17
  groq_api_key = get_groq_api_key()
18
  groq_client = Groq(api_key=groq_api_key) if groq_api_key else None
 
6
  import os
7
 
8
  # --- Groq API Key Handling ---
 
9
  def get_groq_api_key():
10
+ return os.environ.get('GROQ_API_KEY', '')
 
 
 
 
11
 
12
  groq_api_key = get_groq_api_key()
13
  groq_client = Groq(api_key=groq_api_key) if groq_api_key else None