alexkueck commited on
Commit
7691c1d
·
verified ·
1 Parent(s): a96aaa5

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -3
utils.py CHANGED
@@ -185,6 +185,7 @@ def create_directory_loader(file_type, directory_path):
185
  loaders = {
186
  '.pdf': PyPDFLoader,
187
  '.word': UnstructuredWordDocumentLoader,
 
188
  }
189
  return DirectoryLoader(
190
  path=directory_path,
@@ -201,17 +202,17 @@ def document_loading_splitting():
201
  # kreiere einen DirectoryLoader für jeden file type
202
  pdf_loader = create_directory_loader('.pdf', CHROMA_PDF)
203
  word_loader = create_directory_loader('.word', CHROMA_WORD)
204
- excel_loader = create_directory_loader('.excel', CHROMA_EXCEL)
205
 
206
  # Load the files
207
  pdf_documents = pdf_loader.load()
208
  word_documents = word_loader.load()
209
- excel_documents = excel_loader.load()
210
 
211
  #alle zusammen in docs...
212
  docs.extend(pdf_documents)
213
  docs.extend(word_documents)
214
- docs.extend(excel_documents)
215
 
216
  #andere loader...
217
  # Load PDF
 
185
  loaders = {
186
  '.pdf': PyPDFLoader,
187
  '.word': UnstructuredWordDocumentLoader,
188
+ #'.xlsx': ???
189
  }
190
  return DirectoryLoader(
191
  path=directory_path,
 
202
  # kreiere einen DirectoryLoader für jeden file type
203
  pdf_loader = create_directory_loader('.pdf', CHROMA_PDF)
204
  word_loader = create_directory_loader('.word', CHROMA_WORD)
205
+ #excel_loader = create_directory_loader('.xlsx', CHROMA_EXCEL)
206
 
207
  # Load the files
208
  pdf_documents = pdf_loader.load()
209
  word_documents = word_loader.load()
210
+ #excel_documents = excel_loader.load()
211
 
212
  #alle zusammen in docs...
213
  docs.extend(pdf_documents)
214
  docs.extend(word_documents)
215
+ #docs.extend(excel_documents)
216
 
217
  #andere loader...
218
  # Load PDF