Gregniuki commited on
Commit
9a5878f
·
verified ·
1 Parent(s): d28edb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -154,7 +154,9 @@ def chunk_text(text, max_chars=100):
154
  Returns:
155
  List[str]: A list of text chunks.
156
  """
157
- split_after_space_chars = max_chars + 35
 
 
158
  chunks = []
159
  current_chunk = ""
160
 
 
154
  Returns:
155
  List[str]: A list of text chunks.
156
  """
157
+ if max_chars > 105
158
+ max_chars = 105
159
+ split_after_space_chars = max_chars + 30
160
  chunks = []
161
  current_chunk = ""
162