Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,34 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# Set up the Streamlit app
|
4 |
+
st.title("🧚♀️ Magic Story Buddy 📚")
|
5 |
+
st.markdown("Let's create a magical story just for you!")
|
6 |
+
|
7 |
+
# Initialize the model
|
8 |
+
@st.cache_resource
|
9 |
+
|
10 |
+
# User input
|
11 |
+
child_name = st.text_input("What's your name, young storyteller?")
|
12 |
+
story_theme = st.selectbox("What would you like your story to be about?",
|
13 |
+
["Space Adventure", "Magical Forest", "Underwater World", "Dinosaur Discovery"])
|
14 |
+
|
15 |
+
# Additional options
|
16 |
+
story_length = st.slider("How long should the story be?", 50, 200, 100)
|
17 |
+
include_moral = st.checkbox("Include a moral lesson?")
|
18 |
+
|
19 |
+
if st.button("Create My Story!"):
|
20 |
+
# Generate the story
|
21 |
+
story = "En la indústria editorial i en disseny gràfic, lorem ipsum és un text de farciment que s'usa habitualment per a mostrar els elements gràfics d'un document, com ara la tipografia o la composició"
|
22 |
+
|
23 |
+
# Display the story
|
24 |
+
st.markdown("## Your Magical Story")
|
25 |
+
st.write(story)
|
26 |
+
|
27 |
+
# Add a fun element
|
28 |
+
st.balloons()
|
29 |
+
else:
|
30 |
+
st.warning("Please tell me your name and choose a story theme.")
|
31 |
+
|
32 |
+
# Add some child-friendly decorations
|
33 |
+
st.markdown("---")
|
34 |
+
st.markdown("🌟 Remember, you're the star of every story! 🌟")
|