Spaces:
Build error
Build error
Leo Liu commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,11 +27,6 @@ def text2story(text):
|
|
| 27 |
story_text = story_text[:last_punctuation+1]
|
| 28 |
|
| 29 |
safe_story = story_text.replace("violence", "").replace("scary", "").replace("died", "solved")
|
| 30 |
-
|
| 31 |
-
# 确保以快乐结局结束
|
| 32 |
-
happy_endings = ["happily ever after", "big smile", "learned a good lesson"]
|
| 33 |
-
if not any(ending in safe_story.lower() for ending in happy_endings):
|
| 34 |
-
safe_story += " And they all lived happily ever after!"
|
| 35 |
return safe_story
|
| 36 |
|
| 37 |
# text2audio
|
|
|
|
| 27 |
story_text = story_text[:last_punctuation+1]
|
| 28 |
|
| 29 |
safe_story = story_text.replace("violence", "").replace("scary", "").replace("died", "solved")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
return safe_story
|
| 31 |
|
| 32 |
# text2audio
|