Update app.py
Browse files
app.py
CHANGED
|
@@ -236,13 +236,14 @@ def run_and_submit_all(profile: Optional[gr.OAuthProfile]) -> tuple[str, pd.Data
|
|
| 236 |
results_log: List[Dict[str, Any]] = []
|
| 237 |
answers_payload: List[Dict[str, str]] = []
|
| 238 |
print(f"Running agent on {len(questions_data)} questions…")
|
| 239 |
-
for item in questions_data:
|
| 240 |
task_id = item.get("task_id")
|
| 241 |
question_text = item.get("question")
|
| 242 |
if not task_id or question_text is None:
|
| 243 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 244 |
continue
|
| 245 |
try:
|
|
|
|
| 246 |
answer = agent(question_text, task_id)
|
| 247 |
answers_payload.append({"task_id": task_id, "submitted_answer": answer})
|
| 248 |
results_log.append({
|
|
|
|
| 236 |
results_log: List[Dict[str, Any]] = []
|
| 237 |
answers_payload: List[Dict[str, str]] = []
|
| 238 |
print(f"Running agent on {len(questions_data)} questions…")
|
| 239 |
+
for number, item in enumerate(questions_data):
|
| 240 |
task_id = item.get("task_id")
|
| 241 |
question_text = item.get("question")
|
| 242 |
if not task_id or question_text is None:
|
| 243 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 244 |
continue
|
| 245 |
try:
|
| 246 |
+
print(f"===== QUESTION {item + 1}/{len(questions_data)} (ID: {task_id}): {question_text} ==== ")
|
| 247 |
answer = agent(question_text, task_id)
|
| 248 |
answers_payload.append({"task_id": task_id, "submitted_answer": answer})
|
| 249 |
results_log.append({
|