danicafisher commited on
Commit
7beb366
1 Parent(s): 85bb406

Update helper_functions.py

Browse files
Files changed (1) hide show
  1. helper_functions.py +2 -2
helper_functions.py CHANGED
@@ -1,4 +1,4 @@
1
- from langchain_community.document_loaders import PyMuPDF, TextLoader, UnstructuredURLLoader
2
  from langchain_community.vectorstores import Qdrant
3
  import os
4
  import requests
@@ -25,7 +25,7 @@ def load_documents_from_url(url):
25
  # Check if it's a PDF
26
  if url.endswith(".pdf"):
27
  try:
28
- loader = PyMuPDF(url)
29
  return loader.load()
30
  except Exception as e:
31
  print(f"Error loading PDF from {url}: {e}")
 
1
+ from langchain_community.document_loaders import PyMuPDFLoader, TextLoader, UnstructuredURLLoader
2
  from langchain_community.vectorstores import Qdrant
3
  import os
4
  import requests
 
25
  # Check if it's a PDF
26
  if url.endswith(".pdf"):
27
  try:
28
+ loader = PyMuPDFLoader(url)
29
  return loader.load()
30
  except Exception as e:
31
  print(f"Error loading PDF from {url}: {e}")