Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -185,7 +185,6 @@ def create_directory_loader(file_type, directory_path):
|
|
185 |
loaders = {
|
186 |
'.pdf': PyPDFLoader,
|
187 |
'.word': UnstructuredWordDocumentLoader,
|
188 |
-
#'.xlsx': ???
|
189 |
}
|
190 |
return DirectoryLoader(
|
191 |
path=directory_path,
|
@@ -202,17 +201,15 @@ def document_loading_splitting():
|
|
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 |
-
|
216 |
|
217 |
#andere loader...
|
218 |
# Load PDF
|
|
|
185 |
loaders = {
|
186 |
'.pdf': PyPDFLoader,
|
187 |
'.word': UnstructuredWordDocumentLoader,
|
|
|
188 |
}
|
189 |
return DirectoryLoader(
|
190 |
path=directory_path,
|
|
|
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 |
|
205 |
# Load the files
|
206 |
pdf_documents = pdf_loader.load()
|
207 |
word_documents = word_loader.load()
|
|
|
208 |
|
209 |
#alle zusammen in docs...
|
210 |
docs.extend(pdf_documents)
|
211 |
docs.extend(word_documents)
|
212 |
+
|
213 |
|
214 |
#andere loader...
|
215 |
# Load PDF
|