Update app.py
Browse files
app.py
CHANGED
@@ -45,9 +45,9 @@ def predict(text, voice='af_heart', speed=1):
|
|
45 |
return generate_first(text, voice, speed, use_gpu=False)[0]
|
46 |
|
47 |
def tokenize_first(text, voice='af_heart'):
|
48 |
-
# Split the input text into words and return as a list
|
49 |
-
words = text.split()
|
50 |
-
return
|
51 |
|
52 |
def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
53 |
text = text if CHAR_LIMIT is None else text.strip()[:CHAR_LIMIT]
|
|
|
45 |
return generate_first(text, voice, speed, use_gpu=False)[0]
|
46 |
|
47 |
def tokenize_first(text, voice='af_heart'):
|
48 |
+
# Split the input text into words and return as a list of words (fix applied here)
|
49 |
+
words = text.split() # This splits the text into words based on spaces
|
50 |
+
return words # Return a list of words
|
51 |
|
52 |
def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
53 |
text = text if CHAR_LIMIT is None else text.strip()[:CHAR_LIMIT]
|