Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -112,7 +112,7 @@ async def process_question(agent, question_text: str, task_id: str, file_path: O
|
|
| 112 |
for attempt in range(max_retries):
|
| 113 |
try:
|
| 114 |
while not token_bucket.consume(1):
|
| 115 |
-
print(f"Rate limit reached for task
|
| 116 |
await asyncio.sleep(retry_delay)
|
| 117 |
print(f"Processing task {task_id} (attempt {attempt + 1})...")
|
| 118 |
submitted_answer = await asyncio.wait_for(
|
|
@@ -188,6 +188,7 @@ async def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 188 |
print(f"Running agent on {len(questions_data)} questions...")
|
| 189 |
|
| 190 |
for item in questions_data:
|
|
|
|
| 191 |
task_id = item.get("task_id")
|
| 192 |
question_text = item.get("question")
|
| 193 |
if not task_id or question_text is None:
|
|
|
|
| 112 |
for attempt in range(max_retries):
|
| 113 |
try:
|
| 114 |
while not token_bucket.consume(1):
|
| 115 |
+
print(f"Rate limit reached for task. Waiting to retry...")
|
| 116 |
await asyncio.sleep(retry_delay)
|
| 117 |
print(f"Processing task {task_id} (attempt {attempt + 1})...")
|
| 118 |
submitted_answer = await asyncio.wait_for(
|
|
|
|
| 188 |
print(f"Running agent on {len(questions_data)} questions...")
|
| 189 |
|
| 190 |
for item in questions_data:
|
| 191 |
+
result = None # Initialize result
|
| 192 |
task_id = item.get("task_id")
|
| 193 |
question_text = item.get("question")
|
| 194 |
if not task_id or question_text is None:
|