Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ class BasicAgent:
|
|
| 27 |
|
| 28 |
def format_final_answer(self, answer: str) -> str:
|
| 29 |
"""Ensure final answer matches required format"""
|
| 30 |
-
cleaned = " ".join(answer.split())
|
| 31 |
return f"FINAL ANSWER: {cleaned}"
|
| 32 |
|
| 33 |
def check_commutativity(self):
|
|
@@ -60,11 +60,6 @@ class BasicAgent:
|
|
| 60 |
) / len(words)
|
| 61 |
return reversed_ratio > 0.3
|
| 62 |
|
| 63 |
-
def format_final_answer(self, answer: str) -> str:
|
| 64 |
-
"""Ensure final answer matches required format, and force it to be on one line."""
|
| 65 |
-
cleaned = " ".join(answer.split()) # Remove extra spaces and make sure it's a single line
|
| 66 |
-
return f"FINAL ANSWER: {cleaned}"
|
| 67 |
-
|
| 68 |
def solve_riddle(self, question: str) -> str:
|
| 69 |
question = question[::-1]
|
| 70 |
if "opposite of the word" in question:
|
|
@@ -161,7 +156,7 @@ with gr.Blocks() as demo:
|
|
| 161 |
gr.Markdown("# Basic Agent Evaluation Runner")
|
| 162 |
gr.LoginButton()
|
| 163 |
run_button = gr.Button("Run Evaluation & Submit All Answers")
|
| 164 |
-
status_output = gr.Textbox(label="Run Status / Submission Result", max_lines=
|
| 165 |
results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
|
| 166 |
|
| 167 |
run_button.click(
|
|
|
|
| 27 |
|
| 28 |
def format_final_answer(self, answer: str) -> str:
|
| 29 |
"""Ensure final answer matches required format"""
|
| 30 |
+
cleaned = " ".join(answer.split()) # Clean extra spaces and make sure it's a single line
|
| 31 |
return f"FINAL ANSWER: {cleaned}"
|
| 32 |
|
| 33 |
def check_commutativity(self):
|
|
|
|
| 60 |
) / len(words)
|
| 61 |
return reversed_ratio > 0.3
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
def solve_riddle(self, question: str) -> str:
|
| 64 |
question = question[::-1]
|
| 65 |
if "opposite of the word" in question:
|
|
|
|
| 156 |
gr.Markdown("# Basic Agent Evaluation Runner")
|
| 157 |
gr.LoginButton()
|
| 158 |
run_button = gr.Button("Run Evaluation & Submit All Answers")
|
| 159 |
+
status_output = gr.Textbox(label="Run Status / Submission Result", lines=1, max_lines=1, interactive=False, max_length=200)
|
| 160 |
results_table = gr.DataFrame(label="Questions and Agent Answers", wrap=True)
|
| 161 |
|
| 162 |
run_button.click(
|