Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
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']
|