Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,10 @@ from langchain.llms import HuggingFaceHub
|
|
| 10 |
from htmltemplates import css, bot_template, user_template
|
| 11 |
|
| 12 |
def get_text_chunks(text):
|
| 13 |
-
text_splitter =
|
| 14 |
separator="\n",
|
| 15 |
-
chunk_size=1000,
|
|
|
|
| 16 |
length_function=len
|
| 17 |
)
|
| 18 |
chunks = text_splitter.split_text(text)
|
|
|
|
| 10 |
from htmltemplates import css, bot_template, user_template
|
| 11 |
|
| 12 |
def get_text_chunks(text):
|
| 13 |
+
text_splitter = RecursiveCharacterTextSplitter(
|
| 14 |
separator="\n",
|
| 15 |
+
chunk_size=1000,
|
| 16 |
+
chunk_overlap=200,
|
| 17 |
length_function=len
|
| 18 |
)
|
| 19 |
chunks = text_splitter.split_text(text)
|