Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,18 +103,18 @@ def run_evaluation(profile: gr.OAuthProfile | None):
|
|
| 103 |
if item.get("file_name"):
|
| 104 |
attachment = get_attachment(task_id)
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
-
if answer.startswith("Agent error:"):
|
| 109 |
-
|
| 110 |
-
|
| 111 |
|
| 112 |
-
answers.append({
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
})
|
| 116 |
|
| 117 |
-
log += f"Answer: {answer}\n"
|
| 118 |
|
| 119 |
answers.append({
|
| 120 |
"task_id": task_id,
|
|
|
|
| 103 |
if item.get("file_name"):
|
| 104 |
attachment = get_attachment(task_id)
|
| 105 |
|
| 106 |
+
answer = answer_question(question, attachment)
|
| 107 |
|
| 108 |
+
if answer.startswith("Agent error:"):
|
| 109 |
+
log += f"Model inference failed: {answer}\n"
|
| 110 |
+
return log + "\nNo answers submitted. Please fix model inference first.", answers
|
| 111 |
|
| 112 |
+
answers.append({
|
| 113 |
+
"task_id": task_id,
|
| 114 |
+
"submitted_answer": answer
|
| 115 |
+
})
|
| 116 |
|
| 117 |
+
log += f"Answer: {answer}\n"
|
| 118 |
|
| 119 |
answers.append({
|
| 120 |
"task_id": task_id,
|