From 93a7a8c25d000fcc1f8d2d87c2da5878ebf81ea1 Mon Sep 17 00:00:00 2001 From: HongCheng Date: Fri, 3 May 2024 00:48:46 +0900 Subject: [PATCH] Update data_processing.py format --- rag/src/data_processing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rag/src/data_processing.py b/rag/src/data_processing.py index ca6174b..1939d6f 100644 --- a/rag/src/data_processing.py +++ b/rag/src/data_processing.py @@ -145,9 +145,9 @@ class Data_process(): split_docs = [] logger.info(f'Loading txt files from {data_path}') if os.path.isdir(data_path): - loader = DirectoryLoader(data_path, glob="**/*.txt",show_progress=True) - docs = loader.load() - split_docs = text_spliter.split_documents(docs) + loader = DirectoryLoader(data_path, glob="**/*.txt",show_progress=True) + docs = loader.load() + split_docs = text_spliter.split_documents(docs) elif data_path.endswith('.txt'): file_path = data_path logger.info(f'splitting file {file_path}')