Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,11 +130,10 @@ def pvsnp(problem):
|
|
130 |
critic_answer = llm_response(f'''Given the problem: {problem} and the agent response: {answer}, come up with a user friendly explanation that highlights the answer along
|
131 |
with the tools leveraged.''')
|
132 |
final_answer = f"""
|
133 |
-
Agent's Response:
|
134 |
-
{textwrap.indent(textwrap.fill(answer, width=80), prefix=' ')}
|
135 |
|
136 |
Critic's Response:
|
137 |
-
{
|
138 |
"""
|
139 |
return final_answer
|
140 |
|
@@ -147,7 +146,7 @@ iface = gr.Interface(
|
|
147 |
description="PolyMath is an AI-powered math agent designed to tackle both symbolic and numeric computations with precision. It's like having a digital mathematician by your side — whether you're exploring calculus, number theory, or algebraic puzzles.",
|
148 |
theme = gr.themes.Ocean(),
|
149 |
examples = ["Simplify x*2+2x+1", "Solve x^2 - 4x + 3 = 0", "Integrate x * e^x dx" ]
|
150 |
-
)
|
151 |
|
152 |
# Launch the app
|
153 |
iface.launch()
|
|
|
130 |
critic_answer = llm_response(f'''Given the problem: {problem} and the agent response: {answer}, come up with a user friendly explanation that highlights the answer along
|
131 |
with the tools leveraged.''')
|
132 |
final_answer = f"""
|
133 |
+
Agent's Response: {answer}
|
|
|
134 |
|
135 |
Critic's Response:
|
136 |
+
{critic_answer}
|
137 |
"""
|
138 |
return final_answer
|
139 |
|
|
|
146 |
description="PolyMath is an AI-powered math agent designed to tackle both symbolic and numeric computations with precision. It's like having a digital mathematician by your side — whether you're exploring calculus, number theory, or algebraic puzzles.",
|
147 |
theme = gr.themes.Ocean(),
|
148 |
examples = ["Simplify x*2+2x+1", "Solve x^2 - 4x + 3 = 0", "Integrate x * e^x dx" ]
|
149 |
+
)
|
150 |
|
151 |
# Launch the app
|
152 |
iface.launch()
|