Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -579,9 +579,8 @@ STRICT REQUIREMENTS:
|
|
579 |
resolution_text, has_discrepancy, revised_solution = check_and_resolve_discrepancy(response_text, sympy_output)
|
580 |
response_text = f"{response_text}\n\nSymPy Verification Results:\n```\n{sympy_output}\n```\n\nVerification Analysis:\n{resolution_text}"
|
581 |
|
582 |
-
|
583 |
-
|
584 |
-
logger.debug("Performing final verification for difficulty 5 problem with discrepancy")
|
585 |
final_verification = perform_final_verification(revised_solution)
|
586 |
response_text += "\n\nFinal Expert Verification:\n" + final_verification
|
587 |
else:
|
@@ -708,7 +707,7 @@ Please maintain the same LaTeX formatting as the original solution."""
|
|
708 |
# Check for any indication of inconsistency or error
|
709 |
inconsistency_phrases = [
|
710 |
"inconsistent", "inconsistency", "incorrect", "error", "wrong",
|
711 |
-
"
|
712 |
]
|
713 |
has_discrepancy = any(phrase in resolution_text.lower() for phrase in inconsistency_phrases)
|
714 |
|
|
|
579 |
resolution_text, has_discrepancy, revised_solution = check_and_resolve_discrepancy(response_text, sympy_output)
|
580 |
response_text = f"{response_text}\n\nSymPy Verification Results:\n```\n{sympy_output}\n```\n\nVerification Analysis:\n{resolution_text}"
|
581 |
|
582 |
+
if has_discrepancy and revised_solution:
|
583 |
+
logger.debug("Performing final verification for dproblem with discrepancy")
|
|
|
584 |
final_verification = perform_final_verification(revised_solution)
|
585 |
response_text += "\n\nFinal Expert Verification:\n" + final_verification
|
586 |
else:
|
|
|
707 |
# Check for any indication of inconsistency or error
|
708 |
inconsistency_phrases = [
|
709 |
"inconsistent", "inconsistency", "incorrect", "error", "wrong",
|
710 |
+
"discrepancy", "mistaken", "mistake"
|
711 |
]
|
712 |
has_discrepancy = any(phrase in resolution_text.lower() for phrase in inconsistency_phrases)
|
713 |
|