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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,10 +33,10 @@ def compose_story_from_caption(caption_detail):
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']
41
  return story_text
42
 
 
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 between 100 and 300 words in length.\n\n"
37
  f"Image Details: {caption_detail}\n\nStory:"
38
  )
39
+ story_results = story_pipeline(prompt_text, num_return_sequences=1)
40
  story_text = story_results[0]['generated_text']
41
  return story_text
42