sabonzo commited on
Commit
2dcf689
·
verified ·
1 Parent(s): c74e2a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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
- logging.error(f"Q{q_num_str}: Required GAIA file URL is MISSING for task {task_id}!")
468
- final_answer = f"ERROR: Required GAIA file URL missing for Q{q_num_str}."
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
- file_path = download_file(file_url, self.temp_dir, task_id) # Use standard download
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}."