Trial run.
Browse files
app.py
CHANGED
@@ -99,15 +99,12 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
99 |
continue
|
100 |
try:
|
101 |
submitted_answer = agent(question_text)
|
102 |
-
print(f"Agent is going to sumbit answer for task {task_id} (first 50 chars): {submitted_answer[:50]}...")
|
103 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
104 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
105 |
except Exception as e:
|
106 |
print(f"Error running agent on task {task_id}: {e}")
|
107 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
108 |
|
109 |
-
return
|
110 |
-
|
111 |
if not answers_payload:
|
112 |
print("Agent did not produce any answers to submit.")
|
113 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
@@ -163,7 +160,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
163 |
|
164 |
# --- Build Gradio Interface using Blocks ---
|
165 |
with gr.Blocks() as demo:
|
166 |
-
gr.Markdown("# Basic Agent Evaluation Runner #
|
167 |
gr.Markdown(
|
168 |
"""
|
169 |
**Instructions:**
|
|
|
99 |
continue
|
100 |
try:
|
101 |
submitted_answer = agent(question_text)
|
|
|
102 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
103 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
104 |
except Exception as e:
|
105 |
print(f"Error running agent on task {task_id}: {e}")
|
106 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
107 |
|
|
|
|
|
108 |
if not answers_payload:
|
109 |
print("Agent did not produce any answers to submit.")
|
110 |
return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
|
|
160 |
|
161 |
# --- Build Gradio Interface using Blocks ---
|
162 |
with gr.Blocks() as demo:
|
163 |
+
gr.Markdown("# Basic Agent Evaluation Runner #14")
|
164 |
gr.Markdown(
|
165 |
"""
|
166 |
**Instructions:**
|