Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def chunk(text, length, splitter_selection, separators_str, length_unit_selectio
|
|
34 |
if splitter_selection == LABEL_TEXTSPLITTER:
|
35 |
if "token" in length_unit_selection.lower():
|
36 |
text_splitter = CharacterTextSplitter.from_huggingface_tokenizer(
|
37 |
-
|
38 |
separator="",
|
39 |
chunk_size=length,
|
40 |
chunk_overlap=0,
|
@@ -52,7 +52,7 @@ def chunk(text, length, splitter_selection, separators_str, length_unit_selectio
|
|
52 |
elif splitter_selection == LABEL_RECURSIVE:
|
53 |
if "token" in length_unit_selection.lower():
|
54 |
text_splitter = RecursiveCharacterTextSplitter.from_huggingface_tokenizer(
|
55 |
-
|
56 |
chunk_size=chunk_size,
|
57 |
chunk_overlap=0,
|
58 |
add_start_index=True,
|
|
|
34 |
if splitter_selection == LABEL_TEXTSPLITTER:
|
35 |
if "token" in length_unit_selection.lower():
|
36 |
text_splitter = CharacterTextSplitter.from_huggingface_tokenizer(
|
37 |
+
bert_tokenizer,
|
38 |
separator="",
|
39 |
chunk_size=length,
|
40 |
chunk_overlap=0,
|
|
|
52 |
elif splitter_selection == LABEL_RECURSIVE:
|
53 |
if "token" in length_unit_selection.lower():
|
54 |
text_splitter = RecursiveCharacterTextSplitter.from_huggingface_tokenizer(
|
55 |
+
bert_tokenizer,
|
56 |
chunk_size=chunk_size,
|
57 |
chunk_overlap=0,
|
58 |
add_start_index=True,
|