Spaces:
Sleeping
Sleeping
Update tp_final.py
Browse files- tp_final.py +3 -0
tp_final.py
CHANGED
|
@@ -259,6 +259,7 @@ def generate_analysis(request: AnalysisRequest):
|
|
| 259 |
# Assuming direcindirecprompt is imported from config
|
| 260 |
|
| 261 |
direcindirecgroq_response = groq_calls(direcindirecprompt)
|
|
|
|
| 262 |
# If the response acts as a JSON source, we try to parse it to ensure validity
|
| 263 |
# parsed_check = json.loads(direcindirecgroq_response)
|
| 264 |
except Exception as e:
|
|
@@ -287,6 +288,7 @@ def generate_analysis(request: AnalysisRequest):
|
|
| 287 |
}}
|
| 288 |
'''
|
| 289 |
guidegroq_response = groq_calls(guideprompt)
|
|
|
|
| 290 |
except Exception as e:
|
| 291 |
raise HTTPException(status_code=502, detail=f"Groq API Error (Guideline Generation): {str(e)}")
|
| 292 |
|
|
@@ -372,6 +374,7 @@ def generate_analysis(request: AnalysisRequest):
|
|
| 372 |
'''
|
| 373 |
|
| 374 |
cosinegroq_response = groq_calls(cosineprompt)
|
|
|
|
| 375 |
parsed_cosine_json = json.loads(cosinegroq_response)
|
| 376 |
|
| 377 |
user_problem = parsed_cosine_json
|
|
|
|
| 259 |
# Assuming direcindirecprompt is imported from config
|
| 260 |
|
| 261 |
direcindirecgroq_response = groq_calls(direcindirecprompt)
|
| 262 |
+
print(direcindirecgroq_response)
|
| 263 |
# If the response acts as a JSON source, we try to parse it to ensure validity
|
| 264 |
# parsed_check = json.loads(direcindirecgroq_response)
|
| 265 |
except Exception as e:
|
|
|
|
| 288 |
}}
|
| 289 |
'''
|
| 290 |
guidegroq_response = groq_calls(guideprompt)
|
| 291 |
+
print(guidegroq_response)
|
| 292 |
except Exception as e:
|
| 293 |
raise HTTPException(status_code=502, detail=f"Groq API Error (Guideline Generation): {str(e)}")
|
| 294 |
|
|
|
|
| 374 |
'''
|
| 375 |
|
| 376 |
cosinegroq_response = groq_calls(cosineprompt)
|
| 377 |
+
print(cosinegroq_response)
|
| 378 |
parsed_cosine_json = json.loads(cosinegroq_response)
|
| 379 |
|
| 380 |
user_problem = parsed_cosine_json
|