Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -464,12 +464,11 @@ class SabonzoAgent:
|
|
| 464 |
elif q_num_str in TASKS_NEEDING_GAIA_FILE:
|
| 465 |
# Check if the file_url was provided from the /questions endpoint data
|
| 466 |
if not file_url:
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
analysis_context = f"Analysis Context: {final_answer}"
|
| 470 |
else:
|
| 471 |
logging.info(f"Q{q_num_str}: Attempting GAIA file download from: {file_url}")
|
| 472 |
-
|
| 473 |
|
| 474 |
if not file_path: # Download failed or file is empty
|
| 475 |
analysis_result = f"ERROR: Failed download/access required GAIA file for Q{q_num_str} from {file_url}."
|
|
|
|
| 464 |
elif q_num_str in TASKS_NEEDING_GAIA_FILE:
|
| 465 |
# Check if the file_url was provided from the /questions endpoint data
|
| 466 |
if not file_url:
|
| 467 |
+
file_url = f"{self.api_url.rstrip('/')}/files/{task_id}"
|
| 468 |
+
logging.info(f"Q{q_num_str}: Constructed GAIA file URL: {file_url}")
|
|
|
|
| 469 |
else:
|
| 470 |
logging.info(f"Q{q_num_str}: Attempting GAIA file download from: {file_url}")
|
| 471 |
+
file_path = download_file(file_url, self.temp_dir, task_id) # Use standard download
|
| 472 |
|
| 473 |
if not file_path: # Download failed or file is empty
|
| 474 |
analysis_result = f"ERROR: Failed download/access required GAIA file for Q{q_num_str} from {file_url}."
|