Front / app.py
fcesc-code's picture
Update app.py
5bd2b6b verified
raw
history blame
1.47 kB
import streamlit as st
# Set up the Streamlit app
# st.Page(page, *, title='Rainyday', default='True')
# pg = st.navigation([st.Page("app.py", title="Bedstories"), st.Page("pages/response.py", title="Bedstory")])
# pg.run()
st.title("🧚‍♀️ Magic Story Buddy 📚")
st.markdown("Let's create a magical story just for you!")
# User input
child_name = st.text_input("What's your name, young storyteller?")
st.write('Your name is ', child_name)
story_theme = st.selectbox("What would you like your story to be about?",
["Space Adventure", "Magical Forest", "Underwater World", "Dinosaur Discovery"])
# Additional options
story_length = st.slider("How long should the story be?", 50, 200, 100)
include_moral = st.checkbox("Include a moral lesson?")
if st.button("Create My Story!"):
# Generate the story
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ó"
# Display the story
st.markdown("## Your Magical Story")
st.write(story)
# Add a fun element
st.balloons()
# Go to response page
st.switch_page("pages/response.py")
else:
st.warning("Please tell me your name and choose a story theme.")
# Add some child-friendly decorations
st.markdown("---")
st.markdown("🌟 Remember, you're the star of every story! 🌟")