Gregniuki commited on
Commit
acfbe27
·
verified ·
1 Parent(s): d6d4270

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -156,9 +156,9 @@ def chunk_text(text, max_chars):
156
  """
157
  if max_chars > 105:
158
  max_chars = 105
159
- if max_chars < 50:
160
  max_chars = max_chars * 2
161
- split_after_space_chars = max_chars + 30
162
  chunks = []
163
  current_chunk = ""
164
 
 
156
  """
157
  if max_chars > 105:
158
  max_chars = 105
159
+ if max_chars < 40:
160
  max_chars = max_chars * 2
161
+ split_after_space_chars = max_chars + int(max_chars * 0.33)
162
  chunks = []
163
  current_chunk = ""
164