koey811 commited on
Commit
84fde0a
·
verified ·
1 Parent(s): b54ef0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def generate_caption(image):
25
  return caption
26
 
27
  def generate_story(caption):
28
- prompt = f"Once upon a time, based on the image described as '{caption}', here is a short, simple, and engaging story for children aged 3-10. The story should be easy to understand, use age-appropriate language, and convey a positive message. Focus on the main elements in the image and create a story that sparks their imagination:\n\n"
29
  story = story_generator(prompt, max_length=500, num_return_sequences=1)[0]["generated_text"]
30
 
31
  # Extract the story text from the generated output
 
25
  return caption
26
 
27
  def generate_story(caption):
28
+ prompt = f"Based on the image described as '{caption}', here is a short, simple, and engaging story for children aged 3-10. The story should be easy to understand, use age-appropriate language, and convey a positive message. Focus on the main elements in the image and create a story that sparks their imagination:\n\n"
29
  story = story_generator(prompt, max_length=500, num_return_sequences=1)[0]["generated_text"]
30
 
31
  # Extract the story text from the generated output