m-ric HF staff commited on
Commit
32d98e4
1 Parent(s): 6334a1e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- AutoTokenizer.from_pretrained(tokenizer_name),
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
- AutoTokenizer.from_pretrained(tokenizer_name),
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,