Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,7 +102,13 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 102 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 103 |
continue
|
| 104 |
|
| 105 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
try:
|
| 108 |
submitted_answer = agent(question_text)
|
|
|
|
| 102 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 103 |
continue
|
| 104 |
|
| 105 |
+
# Add download information for files if present
|
| 106 |
+
if item.get("file_name", "") != "":
|
| 107 |
+
question_text += "\n".join([
|
| 108 |
+
"",
|
| 109 |
+
"You can download the attachment here:",
|
| 110 |
+
f"{api_url}/files/{task_id}",
|
| 111 |
+
])
|
| 112 |
|
| 113 |
try:
|
| 114 |
submitted_answer = agent(question_text)
|