Spaces:
Sleeping
Sleeping
Commit
·
16b6c34
1
Parent(s):
f9352b3
added mnual input section
Browse files
app.py
CHANGED
|
@@ -130,6 +130,19 @@ with gr.Blocks() as demo:
|
|
| 130 |
|
| 131 |
gr.LoginButton()
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
run_button = gr.Button("Run Evaluation & Submit All Answers")
|
| 134 |
|
| 135 |
status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)
|
|
|
|
| 130 |
|
| 131 |
gr.LoginButton()
|
| 132 |
|
| 133 |
+
# Add above: run_button = gr.Button(...)
|
| 134 |
+
manual_input = gr.Textbox(label="Try the Agent Manually", placeholder="e.g., Solve for x: 2*x + 3 = 7")
|
| 135 |
+
manual_output = gr.Textbox(label="Agent Response", lines=4, interactive=False)
|
| 136 |
+
manual_test_button = gr.Button("Run Agent Locally")
|
| 137 |
+
|
| 138 |
+
# Wire up the manual input button
|
| 139 |
+
def run_manual_input(user_input):
|
| 140 |
+
agent = MathSolverAgent()
|
| 141 |
+
return agent(user_input)
|
| 142 |
+
|
| 143 |
+
manual_test_button.click(fn=run_manual_input, inputs=manual_input, outputs=manual_output)
|
| 144 |
+
|
| 145 |
+
|
| 146 |
run_button = gr.Button("Run Evaluation & Submit All Answers")
|
| 147 |
|
| 148 |
status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)
|