Spaces:
Sleeping
Sleeping
Update report_generator.py
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
| 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"]
|