LovingAITest / app.py
awacke1's picture
Update app.py
dc88719 verified
# 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()