IrisDeng commited on
Commit
8874e7c
·
verified ·
1 Parent(s): a4a0cba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -30,11 +30,11 @@ def compose_story_from_caption(caption_detail):
30
  model="Qwen/Qwen2-1.5B",
31
  )
32
  prompt_text = (
33
- "You are a creative children's story writer. Based on the following image details, "
34
- "please write an imaginative story for children aged 3-10. Do not simply rephrase the image details; "
35
- "instead, expand creatively by adding fun characters, adventures, and unexpected twists. "
36
- "The story must be at least 100 words long.\n\n"
37
- f"Image Details: {caption_detail}\n\nStory:"
38
  )
39
  story_results = story_pipeline(prompt_text, max_length=300, num_return_sequences=1)
40
  story_text = story_results[0]['generated_text']
 
30
  model="Qwen/Qwen2-1.5B",
31
  )
32
  prompt_text = (
33
+ "You are a talented and imaginative storyteller for children aged 3 to 10. "
34
+ "Using the details derived from the image below, craft a captivating tale that goes beyond merely describing the scene. "
35
+ "Let your creativity shine by introducing engaging characters, adventurous journeys, and delightful surprises. "
36
+ "Your story should be vivid, original, and at least 100 words in length.\n\n"
37
+ f"Image Details: {caption_detail}\n\nStory:"
38
  )
39
  story_results = story_pipeline(prompt_text, max_length=300, num_return_sequences=1)
40
  story_text = story_results[0]['generated_text']