Gregniuki commited on
Commit
3e37315
·
verified ·
1 Parent(s): 5ac903a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -171,7 +171,7 @@ def chunk_text(text, max_chars):
171
  current_chunk = ""
172
 
173
  # Split the text into sentences based on punctuation followed by whitespace
174
- sentences = re.split(r"(?<=[;:,.!?])\s+|(?<=[;:,。!?])", text)
175
 
176
  for sentence in sentences:
177
  # If adding this sentence doesn't exceed max_chars, append it to the current chunk
 
171
  current_chunk = ""
172
 
173
  # Split the text into sentences based on punctuation followed by whitespace
174
+ sentences = re.split(r"(?<=[;:,.。、!?])\s+|(?<=[;:,.。、!?])", text)
175
 
176
  for sentence in sentences:
177
  # If adding this sentence doesn't exceed max_chars, append it to the current chunk