bcci commited on
Commit
b60527b
·
verified ·
1 Parent(s): 763541a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,14 +46,14 @@ def custom_split_text(text: str) -> list:
46
  """
47
  words = text.split()
48
  chunks = []
49
- chunk_size = 1
50
  start = 0
51
  while start < len(words):
52
  end = start + chunk_size
53
  chunk = " ".join(words[start:end])
54
  chunks.append(chunk)
55
  start = end
56
- chunk_size *= 2 # double the chunk size for the next iteration
57
  return chunks
58
 
59
 
 
46
  """
47
  words = text.split()
48
  chunks = []
49
+ chunk_size = 2
50
  start = 0
51
  while start < len(words):
52
  end = start + chunk_size
53
  chunk = " ".join(words[start:end])
54
  chunks.append(chunk)
55
  start = end
56
+ chunk_size += 2
57
  return chunks
58
 
59