Update app.py
Browse files
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
|
37 |
f"Image Details: {caption_detail}\n\nStory:"
|
38 |
)
|
39 |
-
story_results = story_pipeline(prompt_text,
|
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 |
|