Update app.py
Browse files
app.py
CHANGED
@@ -45,10 +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 |
-
|
49 |
-
|
50 |
-
|
51 |
-
return ''
|
52 |
|
53 |
def generate_all(text, voice='af_heart', speed=1, use_gpu=CUDA_AVAILABLE):
|
54 |
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
|
49 |
+
words = text.split()
|
50 |
+
return ' '.join(words) # Return the words as a space-separated string
|
|
|
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]
|