Spaces:
Runtime error
Runtime error
DiamondYin
commited on
Commit
•
9b281dd
1
Parent(s):
d6baaa7
Update app_utils.py
Browse files- app_utils.py +1 -1
app_utils.py
CHANGED
@@ -39,7 +39,7 @@ def initialize_knowledge_base():
|
|
39 |
loader = DirectoryLoader('profiles', glob='**/*.txt') #文件夹加载器 profiles文件夹下的所有txt文件
|
40 |
docs = loader.load()
|
41 |
|
42 |
-
char_text_splitter = CharacterTextSplitter(chunk_size=
|
43 |
doc_texts = char_text_splitter.split_documents(docs) #文档分割器,作用是将文档分割成小块
|
44 |
|
45 |
# Embed each chunk of text
|
|
|
39 |
loader = DirectoryLoader('profiles', glob='**/*.txt') #文件夹加载器 profiles文件夹下的所有txt文件
|
40 |
docs = loader.load()
|
41 |
|
42 |
+
char_text_splitter = CharacterTextSplitter(chunk_size=2048, chunk_overlap=0) #文本分割器 chunk_size=1000, chunk_overlap=0
|
43 |
doc_texts = char_text_splitter.split_documents(docs) #文档分割器,作用是将文档分割成小块
|
44 |
|
45 |
# Embed each chunk of text
|