Update app.py
Browse files
app.py
CHANGED
@@ -379,10 +379,11 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
379 |
try:
|
380 |
print(f"\nProcessing question {task_id}...")
|
381 |
|
382 |
-
#
|
383 |
-
raw_url = item.get("file_url"
|
384 |
-
|
385 |
-
|
|
|
386 |
|
387 |
answer = agent(
|
388 |
question=item.get("question", ""),
|
|
|
379 |
try:
|
380 |
print(f"\nProcessing question {task_id}...")
|
381 |
|
382 |
+
# Handle file URL with fallback to generic attachment endpoint
|
383 |
+
raw_url = item.get("file_url") or ""
|
384 |
+
if not raw_url: # fallback for empty field
|
385 |
+
raw_url = f"/files/{task_id}" # generic attachment endpoint
|
386 |
+
file_url = f"{api_url}{raw_url}" # absolute URL
|
387 |
|
388 |
answer = agent(
|
389 |
question=item.get("question", ""),
|