vishwask commited on
Commit
75efb0c
·
verified ·
1 Parent(s): f958bed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -80,7 +80,7 @@ def load_doc(list_file_path, chunk_size, chunk_overlap):
80
  # Processing for one document only
81
  # loader = PyPDFLoader(file_path)
82
  # pages = loader.load()
83
- loaders = [TextLoader(x) for x in list_file_path]
84
  pages = []
85
  for loader in loaders:
86
  pages.extend(loader.load())
@@ -231,7 +231,7 @@ def demo():
231
 
232
  def process_pdfs():
233
  # List all PDF files in the directory
234
- pdf_files = [os.path.join(pdf_directory, file) for file in os.listdir(pdf_directory) if file.endswith(".txt")]
235
  return pdf_files
236
 
237
  # Create a dictionary with the necessary information
 
80
  # Processing for one document only
81
  # loader = PyPDFLoader(file_path)
82
  # pages = loader.load()
83
+ loaders = [PyPDFLoader(x) for x in list_file_path]
84
  pages = []
85
  for loader in loaders:
86
  pages.extend(loader.load())
 
231
 
232
  def process_pdfs():
233
  # List all PDF files in the directory
234
+ pdf_files = [os.path.join(pdf_directory, file) for file in os.listdir(pdf_directory) if file.endswith(".pdf")]
235
  return pdf_files
236
 
237
  # Create a dictionary with the necessary information