Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -155,15 +155,15 @@ async def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 155 |
result = None # Initialize result
|
| 156 |
if item.get("task_id") and item.get("question"):
|
| 157 |
# # Only process chess-related questions
|
| 158 |
-
|
| 159 |
result = await process_question(agent, item["question"], item["task_id"], results_log)
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
# Only add if we got a result
|
| 168 |
if result:
|
| 169 |
answers_payload.append(result)
|
|
|
|
| 155 |
result = None # Initialize result
|
| 156 |
if item.get("task_id") and item.get("question"):
|
| 157 |
# # Only process chess-related questions
|
| 158 |
+
if "Vietnamese" in item["question"].lower():
|
| 159 |
result = await process_question(agent, item["question"], item["task_id"], results_log)
|
| 160 |
+
else:
|
| 161 |
+
print(f"Skipping not related question: {item['task_id']}")
|
| 162 |
+
results_log.append({
|
| 163 |
+
"Task ID": item["task_id"],
|
| 164 |
+
"Question": item["question"],
|
| 165 |
+
"Submitted Answer": "Question skipped - not related"
|
| 166 |
+
})
|
| 167 |
# Only add if we got a result
|
| 168 |
if result:
|
| 169 |
answers_payload.append(result)
|