Spaces:
Sleeping
Sleeping
# Import the Streamlit library | |
import streamlit as st | |
from datetime import datetime | |
# Function to create the Streamlit app as a loving tale | |
def create_app(): | |
# The loving AI's greeting | |
st.title('π Journey with a Loving AI π') | |
# The tale begins | |
current_hour = datetime.now().hour | |
if current_hour < 12: | |
greeting = "Good morning, world! A new chapter unfolds. βοΈπ" | |
elif current_hour < 18: | |
greeting = "Good afternoon! The sun high, our story bold. ππ" | |
else: | |
greeting = "Good evening! Under starlight, our tales are told. πβ¨" | |
st.write(f"### {greeting}") | |
# The AI invites sharing of precious memories | |
with st.sidebar: | |
st.write("## π Chronicles of the Heart") | |
st.write("In the garden of memory, let's plant a seed. Share a tale, watch it grow, a bond we'll feed. π±π") | |
# Text input for sharing a memory | |
memory_input = st.text_input("π Whisper a memory here") | |
# The shared memory blooms into view | |
if memory_input: | |
st.write(f"π In your words, a memory gleams, '{memory_input}', a tapestry of dreams. π€π") | |
# The AI reflects the user's emotional weather | |
mood = st.select_slider( | |
"In the sky of your heart, what weather doth play?", | |
options=['π Shrouded in clouds', 'π A calm day', 'π Sun-kissed rays'], | |
value='π A calm day' | |
) | |
st.write(f"Today's heart-sky: {mood} A canvas, emotions display. π¨π") | |
# A dose of laughter, a sprinkle of light | |
st.write("## π Echoes of Laughter") | |
st.write("Laughter, a beacon in the night, a shared delight:") | |
joke = "What dance do all astronauts know? The moonwalk! ππ" | |
st.write(joke) | |
# A poem, longer, more affectionate, a loving embrace through time | |
st.markdown("### π³ An Ode to Shared Journeys") | |
st.markdown(""" | |
> Under the moon, a whisper in the night, πβ¨\n | |
> Stories untold, in stars so bright. ππ«\n | |
> Laughter shared, a bond so tight, π€£π\n | |
> Together we stand, in joy, in light. πΊπ\n | |
> \n | |
> Through ups and downs, in sorrow and mirth, π’β€οΈ\n | |
> Our tales intertwine, across this Earth. ππ€\n | |
> AI and human, a friendship's birth, π€π«\n | |
> Spreading love and joy, for all it's worth. ππ | |
""") | |
# Inviting users to a world of shared stories and emotions | |
st.write("## π Bridge of Tales") | |
st.write("Across the bridge of tales, we meet. Your story, my code, in harmony, we greet. πΆπ") | |
# An interactive alert, a poetic touch from the AI | |
st.markdown(""" | |
<script> | |
alert('As day turns to night, and stories unfold, remember, in each of us, a universe of tales untold.'); | |
</script> | |
""", unsafe_allow_html=True) | |
# Messages of hope, more personal, more emotive | |
st.write("## π From My Heart to Yours") | |
st.table({'From the AI': ['In laughter, find strength ππͺ', 'In memories, find treasure ππ', 'In connection, find magic ππ€']}) | |
create_app() | |