Leo Liu commited on
Commit
4a46673
·
verified ·
1 Parent(s): 705053d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -5
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