Spaces:
Running
Running
Aymeric Roucher
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def chunk(text, words, splitter_selection):
|
|
| 30 |
text_splitter = CharacterTextSplitter(
|
| 31 |
separator="",
|
| 32 |
chunk_size=words,
|
| 33 |
-
|
| 34 |
length_function=len,
|
| 35 |
is_separator_regex=False,
|
| 36 |
)
|
|
@@ -39,7 +39,7 @@ def chunk(text, words, splitter_selection):
|
|
| 39 |
elif splitter_selection == "Langchain's RecursiveCharacterTextSplitter - vanilla":
|
| 40 |
text_splitter = RecursiveCharacterTextSplitter(
|
| 41 |
chunk_size=words,
|
| 42 |
-
|
| 43 |
length_function=len,
|
| 44 |
add_start_index=True,
|
| 45 |
)
|
|
@@ -48,7 +48,7 @@ def chunk(text, words, splitter_selection):
|
|
| 48 |
elif splitter_selection == "Langchain's RecursiveCharacterTextSplitter - with '.'":
|
| 49 |
text_splitter = RecursiveCharacterTextSplitter(
|
| 50 |
chunk_size=words,
|
| 51 |
-
|
| 52 |
length_function=len,
|
| 53 |
add_start_index=True,
|
| 54 |
separators=["\n\n", "\n", ".", " ", ""],
|
|
|
|
| 30 |
text_splitter = CharacterTextSplitter(
|
| 31 |
separator="",
|
| 32 |
chunk_size=words,
|
| 33 |
+
chunk_overlap=0,
|
| 34 |
length_function=len,
|
| 35 |
is_separator_regex=False,
|
| 36 |
)
|
|
|
|
| 39 |
elif splitter_selection == "Langchain's RecursiveCharacterTextSplitter - vanilla":
|
| 40 |
text_splitter = RecursiveCharacterTextSplitter(
|
| 41 |
chunk_size=words,
|
| 42 |
+
chunk_overlap=0,
|
| 43 |
length_function=len,
|
| 44 |
add_start_index=True,
|
| 45 |
)
|
|
|
|
| 48 |
elif splitter_selection == "Langchain's RecursiveCharacterTextSplitter - with '.'":
|
| 49 |
text_splitter = RecursiveCharacterTextSplitter(
|
| 50 |
chunk_size=words,
|
| 51 |
+
chunk_overlap=0,
|
| 52 |
length_function=len,
|
| 53 |
add_start_index=True,
|
| 54 |
separators=["\n\n", "\n", ".", " ", ""],
|