import streamlit as st
import random
from datetime import datetime
st.set_page_config(
page_title="SoulCompass - Find Your Inner North Star",
page_icon="đ§",
layout="wide"
)
# åå§å
if 'daily_usage' not in st.session_state:
st.session_state.daily_usage = 0
# į°ĄååĄįž
į
tarot_cards = [
"The Fool - New beginnings and fresh starts",
"The Magician - Power to manifest your dreams",
"The High Priestess - Trust your intuition",
"The Empress - Creativity and abundance",
"The Emperor - Structure and authority",
"The Lovers - Love and important choices",
"The Chariot - Victory through determination",
"Strength - Inner courage and compassion",
"The Hermit - Soul searching and wisdom",
"Wheel of Fortune - Life cycles and destiny",
"Justice - Balance and fairness",
"The Hanged Man - New perspective needed",
"Death - Transformation and renewal",
"Temperance - Patience and moderation",
"The Devil - Breaking free from limitations",
"The Tower - Sudden change and awakening",
"The Star - Hope and inspiration",
"The Moon - Dreams and subconscious",
"The Sun - Joy and success",
"Judgement - Spiritual awakening",
"The World - Completion and achievement"
]
# CSS
st.markdown("""
""", unsafe_allow_html=True)
# ä¸ģæ¨éĄ
st.markdown("""
""", unsafe_allow_html=True)
# åŠé¤æŦĄæ¸
remaining = 5 - st.session_state.daily_usage
st.markdown(f"""
đĢ Daily Free Readings: {remaining}/5
""", unsafe_allow_html=True)
# ä¸ģčĻåčŊååĄ
tab1, tab2, tab3, tab4 = st.tabs(["đŽ Tarot Reading", "đĸ Numerology", "đ Soul Journal", "đ¤ AI Therapist"])
# đŽ Tarot
with tab1:
st.header("đŽ Tarot Reading")
st.write("*Let ancient wisdom guide your path*")
question = st.text_area(
"What would you like guidance on?",
placeholder="Example: I'm facing a difficult decision at work...",
height=100
)
if question:
spread = st.selectbox(
"Choose your reading type",
["Single Card - Quick Guidance", "Three Cards - Past Present Future", "Five Cards - Deep Insight"]
)
if st.button("đŽ Draw Cards", type="primary"):
if st.session_state.daily_usage >= 5:
st.error("đ Daily limit reached! Come back tomorrow")
else:
st.session_state.daily_usage += 1
with st.spinner("⨠Drawing your cards..."):
import time
time.sleep(2)
num_cards = 1 if "Single" in spread else (3 if "Three" in spread else 5)
drawn = random.sample(tarot_cards, num_cards)
st.success("đ Your reading is complete!")
for i, card in enumerate(drawn):
st.markdown(f"""
""", unsafe_allow_html=True)
# æįĩč§ŖčŽ
reading = f"""
đŽ **Your SoulCompass Reading**
**Question:** {question}
**Cards Drawn:** {len(drawn)} cards
**Interpretation:**
The cards reveal important insights about your situation. The first card shows your current energy, while the others provide guidance for moving forward.
**Key Message:** Trust your inner wisdom and stay open to new possibilities. The universe is supporting your journey.
**Readings used today:** {st.session_state.daily_usage}/5
"""
st.markdown(f"""
{reading.replace(chr(10), '
')}
""", unsafe_allow_html=True)
# đĸ Numerology
with tab2:
st.header("đĸ Numerology")
st.write("*Discover your numbers*")
col1, col2 = st.columns(2)
with col1:
st.subheader("Life Path Number")
birth_date = st.date_input("Your birth date")
if birth_date and st.button("Calculate"):
date_str = birth_date.strftime('%Y%m%d')
total = sum(int(d) for d in date_str)
while total > 9:
total = sum(int(d) for d in str(total))
meanings = {
1: "Leader - Independent and pioneering",
2: "Peacemaker - Cooperative and diplomatic",
3: "Creative - Expressive and optimistic",
4: "Builder - Practical and hardworking",
5: "Explorer - Freedom-loving and adventurous",
6: "Nurturer - Caring and responsible",
7: "Seeker - Analytical and spiritual",
8: "Achiever - Ambitious and organized",
9: "Humanitarian - Compassionate and wise"
}
st.success(f"Your Life Path Number: **{total}**")
st.info(meanings.get(total, "Special number with unique meaning"))
with col2:
st.subheader("Name Number")
name = st.text_input("Your full name")
if name and st.button("Analyze Name"):
name_num = len(name) % 9 + 1
st.success(f"Your Name Number: **{name_num}**")
st.info("This number influences how others see you")
# đ Soul Journal
with tab3:
st.header("đ Soul Journal")
st.write("*Record your inner journey*")
mood = st.slider("Today's mood (1-10)", 1, 10, 7)
emotion = st.selectbox("Main emotion", ["đ Happy", "đ Sad", "đ° Worried", "đ Calm", "đ¤ Grateful"])
entry = st.text_area(
"Write your thoughts",
placeholder="How are you feeling today? What's on your mind?",
height=120
)
if st.button("đž Save Entry"):
if entry:
st.success("â
Your journal entry has been saved!")
st.balloons()
else:
st.warning("Please write something first")
# đ¤ AI Therapist
with tab4:
st.header("đ¤ AI Therapist")
st.write("*Your 24/7 companion*")
st.markdown("""
đ¤
SoulCompass AI Guide
Here to listen and support you
""", unsafe_allow_html=True)
topic = st.selectbox(
"What would you like to talk about?",
["General Support", "Stress & Anxiety", "Relationships", "Life Goals", "Personal Growth"]
)
message = st.text_area(
"Share your thoughts",
placeholder="Tell me what's on your mind...",
height=100
)
if message and st.button("đĢ Get Support"):
with st.spinner("đ¤ Thinking..."):
import time
time.sleep(1)
responses = [
f"Thank you for sharing about {topic.lower()}. I hear that you're saying: '{message}'. Your feelings are completely valid, and it's brave of you to reach out.",
f"I understand you're dealing with {topic.lower()}. What you've shared - '{message}' - shows real self-awareness. You're taking positive steps by talking about it.",
f"Regarding {topic.lower()}, I want you to know that '{message}' resonates with me. Remember, you have inner strength and wisdom to navigate this."
]
response = random.choice(responses)
st.markdown(f"""
You: {message}
đ¤ AI Guide: {response}
đ I'm here to support you. For serious concerns, please reach out to a professional.
""", unsafe_allow_html=True)
# é č
ŗ
st.markdown("---")
st.markdown("""
đ§ SoulCompass - Find Your Inner North Star
Made with â¤ī¸ for spiritual seekers worldwide
đ Upgrade to Pro | đ§ support@soulcompass.ai | đ soulcompass.ai
""", unsafe_allow_html=True)