smtsead commited on
Commit
3923bee
·
verified ·
1 Parent(s): 02b4ede

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ def text2story(text):
37
  str: Generated story suitable for kids aged 3-10, within 100 words.
38
  """
39
  # Add a prompt to ensure the story is happy, fun, and appropriate for kids
40
- prompt = f"Write a happy and fun story for kids aged 3-10 based on the following scenario: {text}. The story should be cheerful, with no sad, violent, or scary elements. Avoid any mention of guns, weapons, or conflict. The story must have a clear beginning, middle, and end. Keep the story under 100 words."
41
 
42
  # Load the text generation model
43
  story_generator = pipeline("text-generation", model="aspis/gpt2-genre-story-generation")
 
37
  str: Generated story suitable for kids aged 3-10, within 100 words.
38
  """
39
  # Add a prompt to ensure the story is happy, fun, and appropriate for kids
40
+ prompt = f"Write a happy,fun and complete story for kids based on the following scenario: {text}. The story must be with no sad, violent, or scary elements. Must be no any mention of guns, weapons, or conflict. The story should have a clear beginning, middle, and end. Keep the story under 100 words."
41
 
42
  # Load the text generation model
43
  story_generator = pipeline("text-generation", model="aspis/gpt2-genre-story-generation")