Update utils.py
Browse files
utils.py
CHANGED
@@ -325,7 +325,7 @@ def create_directory_loader(file_type, directory_path):
|
|
325 |
repo_type="space",
|
326 |
local_dir=os.path.dirname(temp_path),
|
327 |
local_dir_use_symlinks=False,
|
328 |
-
token=
|
329 |
)
|
330 |
|
331 |
documents.extend(self.loader_func(temp_path))
|
@@ -431,7 +431,7 @@ def document_loading_splitting():
|
|
431 |
|
432 |
|
433 |
# Dateien im Hugging Face Space auflisten
|
434 |
-
files_in_repo = list_repo_files(repo_id=STORAGE_REPO_ID, repo_type="space", token=
|
435 |
pdf_files = [f for f in files_in_repo if f.endswith('.pdf') and f.startswith("chroma/kkg/pdf/")]
|
436 |
word_files = [f for f in files_in_repo if f.endswith('.docx') and f.startswith("chroma/kkg/word/")]
|
437 |
|
|
|
325 |
repo_type="space",
|
326 |
local_dir=os.path.dirname(temp_path),
|
327 |
local_dir_use_symlinks=False,
|
328 |
+
token=hf_token
|
329 |
)
|
330 |
|
331 |
documents.extend(self.loader_func(temp_path))
|
|
|
431 |
|
432 |
|
433 |
# Dateien im Hugging Face Space auflisten
|
434 |
+
files_in_repo = list_repo_files(repo_id=STORAGE_REPO_ID, repo_type="space", token=hf_token)
|
435 |
pdf_files = [f for f in files_in_repo if f.endswith('.pdf') and f.startswith("chroma/kkg/pdf/")]
|
436 |
word_files = [f for f in files_in_repo if f.endswith('.docx') and f.startswith("chroma/kkg/word/")]
|
437 |
|