diff --git a/app.py b/app.py
index de43e1e..9a717dd 100644
--- a/app.py
+++ b/app.py
@@ -15,7 +15,6 @@
import streamlit.components.v1 as components
import os
from dotenv import load_dotenv
-
#AI Integration
import anthropic
import datetime
@@ -241,7 +240,7 @@ def show_main_page():
**Engage with Us:**
- Share your favorite relaxation techniques or feedback on how our platform helps you.
- Your path to a serene and fulfilling life starts here. Let’s embark on this journey together—take the first step today!
+ Your path to a serene and fulfilling life starts here. Let's embark on this journey together—take the first step today!
""")
# Interactive Widgets
@@ -253,18 +252,45 @@ def show_main_page():
st.write("---")
# Survey for Personalized Tips
+ st.markdown(
+ """
+
+ """,
+ unsafe_allow_html=True
+)
st.subheader("Personalized Tips for You")
with st.form(key='personalized_tips_form'):
mood = st.radio("What's your current anxiety level?", ["Low", "Moderate", "High", "Overwhelmed"])
- submit_button = st.form_submit_button("Get Tips")
- if submit_button:
+ st.markdown('💡', unsafe_allow_html=True)
+ submit_button = st.form_submit_button("Get Tip")
+ if submit_button:
tips = {
"Low": "Keep up the great work! Stay consistent with mindfulness techniques.",
"Moderate": "Take a moment to practice deep breathing.",
"High": "Pause and try a guided meditation.",
"Overwhelmed": "It's important to step away and take a break."
}
- st.write(f"**Tip:** {tips[mood]}")
+ with st.spinner("wait for it..."):
+ time.sleep(3)
+ st.write(f"**Tip:** {tips[mood]}")
st.write("---")
@@ -305,7 +331,6 @@ def show_main_page():
# Tip for improving mental health
-
#|------MongoDb for Quick Tips For Mental Health Section for inserting and retreiving the tips------|
#Setting MongoDb connection
mongodb_uri = os.getenv("MONGODB_URI")
@@ -314,8 +339,8 @@ def show_main_page():
tips_collection = db['mental_health_tips']
# Uncomment the following line to populate the database with tips in the format below:
- # tips = []
- # tips_collection.insert_one({"tip": "Take deep breaths to relax."})
+ tips = []
+ tips_collection.insert_one({"tip": "Take deep breaths to relax."})
st.subheader("Quick Tip for Mental Health")
@@ -789,7 +814,31 @@ def show_calm_space():
feeling_description = st.text_area("What exactly are you feeling?", placeholder="Describe your feelings here...")
current_stress_level = st.slider("Current Stress Level (1 to 10)", 1, 10, value=5)
recent_events = st.text_area("Recent Events", placeholder="Describe any recent events that may have contributed to your anxiety or stress...")
-
+ st.markdown(
+ """
+
+ """,
+ unsafe_allow_html=True
+)
+ st.markdown('✔️', unsafe_allow_html=True)
if st.button("Submit"):
st.write("Thank you for sharing. Let’s find some exercises to help you.")
guidance = anxiety_management_guide(mood, feeling_description, current_stress_level, recent_events)
@@ -858,6 +907,31 @@ def show_about_and_feedback():
""")
feedback_activity = st.text_area("How have the activities helped you? Share your experience here:")
+ st.markdown(
+ """
+
+ """,
+ unsafe_allow_html=True
+)
+ st.markdown('📈', unsafe_allow_html=True)
if st.button("Submit Feedback"):
if feedback_activity:
st.success("Thank you for sharing your experience! Your feedback is valuable and appreciated.")
@@ -897,6 +971,31 @@ def show_about_and_feedback():
st.subheader("Subscribe for Updates")
st.write("Stay updated with our latest features, activities, and wellness tips.")
email = st.text_input("Enter your email address:")
+ st.markdown(
+ """
+
+ """,
+ unsafe_allow_html=True
+)
+ st.markdown('🔔', unsafe_allow_html=True)
if st.button("Subscribe"):
if email:
st.success("Thank you for subscribing! You'll receive updates and tips directly to your inbox.")