tatianija commited on
Commit
34bc316
·
verified ·
1 Parent(s): f131c5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -756,12 +756,15 @@ Answer:"""
756
 
757
  try:
758
  # Detect and process URLs
759
- print(f"2. Detecting and processing...")
760
  url_context = self._extract_and_process_urls(question_data)
761
 
762
  if self.debug and url_context:
763
  print(f"URL context: {url_context[:200]}...")
 
 
764
 
 
765
  # Detect and download attachments
766
  print(f"3. Searching for images, audio or code attachments...")
767
  image_files, audio_files, code_files = self._detect_and_download_attachments(question_data)
 
756
 
757
  try:
758
  # Detect and process URLs
759
+ print(f"2. Detecting and processing URLs...")
760
  url_context = self._extract_and_process_urls(question_data)
761
 
762
  if self.debug and url_context:
763
  print(f"URL context: {url_context[:200]}...")
764
+ except Exception as e:
765
+ answer = f"Sorry, I encountered an error extracting URLs: {e}"
766
 
767
+ try:
768
  # Detect and download attachments
769
  print(f"3. Searching for images, audio or code attachments...")
770
  image_files, audio_files, code_files = self._detect_and_download_attachments(question_data)