Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,7 @@ import json
|
|
| 9 |
|
| 10 |
from agent import MagAgent
|
| 11 |
from token_bucket import Limiter, MemoryStorage
|
|
|
|
| 12 |
import aiofiles
|
| 13 |
from typing import Optional
|
| 14 |
|
|
@@ -189,11 +190,11 @@ async def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 189 |
if not task_id or question_text is None:
|
| 190 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 191 |
continue
|
| 192 |
-
if "1ht" in question_text.lower() or "attach" in question_text.lower():
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
else:
|
| 198 |
print(f"Skipping not related question: {task_id}")
|
| 199 |
results_log.append({
|
|
|
|
| 9 |
|
| 10 |
from agent import MagAgent
|
| 11 |
from token_bucket import Limiter, MemoryStorage
|
| 12 |
+
|
| 13 |
import aiofiles
|
| 14 |
from typing import Optional
|
| 15 |
|
|
|
|
| 190 |
if not task_id or question_text is None:
|
| 191 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 192 |
continue
|
| 193 |
+
# if "1ht" in question_text.lower() or "attach" in question_text.lower():
|
| 194 |
+
file_path = await check_n_load_attach(session, task_id)
|
| 195 |
+
result = await process_question(agent, question_text, task_id, file_path, results_log)
|
| 196 |
+
if result:
|
| 197 |
+
answers_payload.append(result)
|
| 198 |
else:
|
| 199 |
print(f"Skipping not related question: {task_id}")
|
| 200 |
results_log.append({
|