bcci commited on
Commit
3ab2b52
·
verified ·
1 Parent(s): 363625a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -62,7 +62,7 @@ def custom_split_text(text: str) -> list:
62
  if '.' in chunk_words[i]:
63
  split_index = i
64
  break
65
- if split_index is not None and split_index !== len(chunk_words) - 1:
66
  # If a period is found and it’s not the last word in the chunk,
67
  # adjust the chunk so it ends at that word.
68
  candidate_end = start + split_index + 1
@@ -170,7 +170,7 @@ def index():
170
  the raw PCM data as it arrives. This method first reads the WAV header (44 bytes)
171
  then continuously pulls in PCM data, converts it to Float32, and plays it.
172
  """
173
- return """
174
  <!DOCTYPE html>
175
  <html>
176
  <head>
 
62
  if '.' in chunk_words[i]:
63
  split_index = i
64
  break
65
+ if split_index is not None and split_index != len(chunk_words) - 1:
66
  # If a period is found and it’s not the last word in the chunk,
67
  # adjust the chunk so it ends at that word.
68
  candidate_end = start + split_index + 1
 
170
  the raw PCM data as it arrives. This method first reads the WAV header (44 bytes)
171
  then continuously pulls in PCM data, converts it to Float32, and plays it.
172
  """
173
+ return r"""
174
  <!DOCTYPE html>
175
  <html>
176
  <head>