hivecorp commited on
Commit
ec46cb3
·
verified ·
1 Parent(s): 95d954d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,11 +20,11 @@ def format_time(seconds):
20
  secs = seconds % 60
21
  return f"{hrs:02}:{mins:02}:{secs:02},{millis:03}"
22
 
23
- # Function to split text based on punctuation, with handling for segments over 8 words
24
  def split_text_into_segments(text):
25
- # Split based on punctuation marks (.!?)
26
  segments = []
27
- raw_segments = re.split(r'([.!?])', text)
28
  temp_sentence = ""
29
 
30
  for i in range(0, len(raw_segments) - 1, 2):
 
20
  secs = seconds % 60
21
  return f"{hrs:02}:{mins:02}:{secs:02},{millis:03}"
22
 
23
+ # Function to split text based on punctuation, handling segments over 8 words
24
  def split_text_into_segments(text):
25
+ # Split based on punctuation marks (.!? and ,)
26
  segments = []
27
+ raw_segments = re.split(r'([.!?,])', text)
28
  temp_sentence = ""
29
 
30
  for i in range(0, len(raw_segments) - 1, 2):