Spaces:
Sleeping
Sleeping
graph test
Browse files
app.py
CHANGED
|
@@ -218,7 +218,7 @@ class BasicAgent:
|
|
| 218 |
|
| 219 |
if state["is_final_answer"]:
|
| 220 |
return "FINAL_ANSWER"
|
| 221 |
-
elif state["attempt"] >
|
| 222 |
return "EXCEEDED_ATTEMPTS"
|
| 223 |
elif state["search_request"]:
|
| 224 |
return "WEB_SEARCH"
|
|
@@ -326,7 +326,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 326 |
results_log = []
|
| 327 |
answers_payload = []
|
| 328 |
print(f"Running agent on {len(questions_data)} questions...")
|
| 329 |
-
for item in questions_data
|
| 330 |
task_id = item.get("task_id")
|
| 331 |
question_text = item.get("question")
|
| 332 |
if not task_id or question_text is None:
|
|
|
|
| 218 |
|
| 219 |
if state["is_final_answer"]:
|
| 220 |
return "FINAL_ANSWER"
|
| 221 |
+
elif state["attempt"] > 4:
|
| 222 |
return "EXCEEDED_ATTEMPTS"
|
| 223 |
elif state["search_request"]:
|
| 224 |
return "WEB_SEARCH"
|
|
|
|
| 326 |
results_log = []
|
| 327 |
answers_payload = []
|
| 328 |
print(f"Running agent on {len(questions_data)} questions...")
|
| 329 |
+
for item in questions_data:
|
| 330 |
task_id = item.get("task_id")
|
| 331 |
question_text = item.get("question")
|
| 332 |
if not task_id or question_text is None:
|