tatianija commited on
Commit
2f41c3b
·
verified ·
1 Parent(s): 49c6b22

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -562,7 +562,7 @@ class IntelligentAgent:
562
  excel_files = []
563
 
564
  if not file_name:
565
- return image_files, audio_files, code_files
566
 
567
  try:
568
  # Construct the file path (assuming file is in the same directory)
@@ -572,7 +572,7 @@ class IntelligentAgent:
572
  if not os.path.exists(local_path):
573
  if self.debug:
574
  print(f"File not found: {local_path}")
575
- return image_files, audio_files, code_files
576
 
577
  # Get file extension
578
  file_ext = Path(file_name).suffix.lower()
@@ -825,7 +825,7 @@ Answer with just "YES" only if your general knowledge is insufficient to answer
825
  with open(local_file_path, 'wb') as f:
826
  f.write(response.content)
827
 
828
- image_files, audio_files, code_files, excel_files = self._detect_and_process_direct_attachments(attachment_name, local_file_path)
829
 
830
  # Process attachments to get context
831
  attachment_context = self._process_attachments(image_files, audio_files, excel_files, code_files)
 
562
  excel_files = []
563
 
564
  if not file_name:
565
+ return image_files, audio_files, excel_files, code_files
566
 
567
  try:
568
  # Construct the file path (assuming file is in the same directory)
 
572
  if not os.path.exists(local_path):
573
  if self.debug:
574
  print(f"File not found: {local_path}")
575
+ return image_files, audio_files, excel_files, code_files
576
 
577
  # Get file extension
578
  file_ext = Path(file_name).suffix.lower()
 
825
  with open(local_file_path, 'wb') as f:
826
  f.write(response.content)
827
 
828
+ image_files, audio_files, excel_files, code_files = self._detect_and_process_direct_attachments(attachment_name, local_file_path)
829
 
830
  # Process attachments to get context
831
  attachment_context = self._process_attachments(image_files, audio_files, excel_files, code_files)