Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def text2story(text):
|
|
| 15 |
story_text = text_to_story_model(text, max_new_tokens=150)[0]['generated_text']
|
| 16 |
words = story_text.split()
|
| 17 |
if len(words) > 100:
|
| 18 |
-
|
| 19 |
return story_text
|
| 20 |
|
| 21 |
def text2speech(text):
|
|
|
|
| 15 |
story_text = text_to_story_model(text, max_new_tokens=150)[0]['generated_text']
|
| 16 |
words = story_text.split()
|
| 17 |
if len(words) > 100:
|
| 18 |
+
story_text = ' '.join(words[:100]) + '.'
|
| 19 |
return story_text
|
| 20 |
|
| 21 |
def text2speech(text):
|