learnopolis commited on
Commit
c6fdac8
·
verified ·
1 Parent(s): 1f063f8

Update report_generator.py

Browse files
Files changed (1) hide show
  1. report_generator.py +4 -1
report_generator.py CHANGED
@@ -236,7 +236,10 @@ def get_ai_analysis(data: dict, metrics: dict) -> dict:
236
 
237
  Returns a dict with each section as a string.
238
  """
239
- client = Groq(api_key=GROQ_API_KEY)
 
 
 
240
 
241
  profile = data["user_profile"]
242
  strategy = data["strategy"]
 
236
 
237
  Returns a dict with each section as a string.
238
  """
239
+ raw_key = os.environ.get("GROQ_API_KEY", "")
240
+ clean_key = raw_key.replace('"', '').replace("'", "").strip()
241
+
242
+ client = Groq(api_key=clean_key)
243
 
244
  profile = data["user_profile"]
245
  strategy = data["strategy"]