Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def chunk(text, length, splitter_selection, separators_str, length_unit_selectio
|
|
40 |
if splitter_selection == LABEL_TEXTSPLITTER:
|
41 |
text_splitter = CharacterTextSplitter(
|
42 |
chunk_size=length,
|
43 |
-
chunk_overlap=
|
44 |
length_function=length_function,
|
45 |
strip_whitespace=False,
|
46 |
is_separator_regex=False,
|
@@ -49,7 +49,7 @@ def chunk(text, length, splitter_selection, separators_str, length_unit_selectio
|
|
49 |
elif splitter_selection == LABEL_RECURSIVE:
|
50 |
text_splitter = RecursiveCharacterTextSplitter(
|
51 |
chunk_size=length,
|
52 |
-
chunk_overlap=
|
53 |
length_function=length_function,
|
54 |
strip_whitespace=False,
|
55 |
separators=separators,
|
|
|
40 |
if splitter_selection == LABEL_TEXTSPLITTER:
|
41 |
text_splitter = CharacterTextSplitter(
|
42 |
chunk_size=length,
|
43 |
+
chunk_overlap=int(chunk_overlap),
|
44 |
length_function=length_function,
|
45 |
strip_whitespace=False,
|
46 |
is_separator_regex=False,
|
|
|
49 |
elif splitter_selection == LABEL_RECURSIVE:
|
50 |
text_splitter = RecursiveCharacterTextSplitter(
|
51 |
chunk_size=length,
|
52 |
+
chunk_overlap=int(chunk_overlap),
|
53 |
length_function=length_function,
|
54 |
strip_whitespace=False,
|
55 |
separators=separators,
|