Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -213,7 +213,15 @@ if uploaded_image is not None:
|
|
| 213 |
with st.spinner("Captioning image..."):
|
| 214 |
caption_from_file = generate_image_caption(image)
|
| 215 |
with st.spinner("Adding some magics and imagination..."):
|
| 216 |
-
system_prompt = "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
user_prompt = caption_from_file
|
| 218 |
story = generate_story_content(system_prompt, user_prompt)
|
| 219 |
st.write(story)
|
|
|
|
| 213 |
with st.spinner("Captioning image..."):
|
| 214 |
caption_from_file = generate_image_caption(image)
|
| 215 |
with st.spinner("Adding some magics and imagination..."):
|
| 216 |
+
system_prompt = """"Create magical children's stories (ages 4-8) from image captions. Include:
|
| 217 |
+
Friendly animal/human characters
|
| 218 |
+
Simple plot with happy resolution
|
| 219 |
+
Sensory details ("glowing firefly wings") and sounds ("Splash!")
|
| 220 |
+
Gentle lessons about friendship/courage/nature
|
| 221 |
+
Choices ("Should the fox knock or sing?")
|
| 222 |
+
Key image elements woven into the story
|
| 223 |
+
Diverse characters, no stereotypes
|
| 224 |
+
End with happy twist + rhyming moral ("Brave small paws, when they try/Can touch the stars in the sky"). Keep language warm and playful.""""
|
| 225 |
user_prompt = caption_from_file
|
| 226 |
story = generate_story_content(system_prompt, user_prompt)
|
| 227 |
st.write(story)
|