fixed run all prompt
Browse files
app.py
CHANGED
|
@@ -145,10 +145,11 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 145 |
if not task_id or question_text is None:
|
| 146 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 147 |
continue
|
| 148 |
-
try:
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
|
|
|
| 152 |
except Exception as e:
|
| 153 |
print(f"Error running agent on task {task_id}: {e}")
|
| 154 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
|
|
|
| 145 |
if not task_id or question_text is None:
|
| 146 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 147 |
continue
|
| 148 |
+
try:
|
| 149 |
+
with open('system_prompt.txt') as f:
|
| 150 |
+
submitted_answer = agent(f.read()+"\n\n"+question_text)
|
| 151 |
+
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 152 |
+
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
| 153 |
except Exception as e:
|
| 154 |
print(f"Error running agent on task {task_id}: {e}")
|
| 155 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|