Spaces:
Sleeping
Sleeping
fix question_text2 bug
Browse files
app.py
CHANGED
|
@@ -151,7 +151,10 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 151 |
try:
|
| 152 |
if task_id in tasks:
|
| 153 |
question_text2 = question_text + f"\n\nThis is the file path: {file_path + tasks[task_id]}"
|
|
|
|
|
|
|
| 154 |
submitted_answer = agent(question_text2)
|
|
|
|
| 155 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 156 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
| 157 |
except Exception as e:
|
|
|
|
| 151 |
try:
|
| 152 |
if task_id in tasks:
|
| 153 |
question_text2 = question_text + f"\n\nThis is the file path: {file_path + tasks[task_id]}"
|
| 154 |
+
if question_text2 is None:
|
| 155 |
+
question_text2 = question_text
|
| 156 |
submitted_answer = agent(question_text2)
|
| 157 |
+
question_text2 = None
|
| 158 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 159 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
| 160 |
except Exception as e:
|