Skip to content

Commit 03c8114

Browse files
Merge branch 'main' into emoji-mood-selector
2 parents f5ae982 + 9c5b7ff commit 03c8114

File tree

11 files changed

+808
-13
lines changed

11 files changed

+808
-13
lines changed

.streamlit/secrets.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GEMINI_API_KEY = "AIzaSyDsLJgA58LvgFtnUdVBLFb08GZQV0wXYjQ"

TalkHeal.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from components.sidebar import render_sidebar
1515
from components.chat_interface import render_chat_interface, handle_chat_input
1616
from components.emergency_page import render_emergency_page
17+
from components.profile import apply_global_font_size
1718

1819
# --- 1. PAGE CONFIG & CSS ---
1920
apply_custom_css()
@@ -34,11 +35,32 @@
3435
"PTSD & Trauma", "OCD & Related Disorders", "Eating Disorders",
3536
"Substance Use Disorders", "ADHD & Neurodevelopmental", "Personality Disorders",
3637
"Sleep Disorders"
37-
],
38+
< ],
3839
"selected_tone": "Compassionate Listener",
3940
"selected_mood": "🙂"
4041
}
4142

43+
# --- 2. SET PAGE CONFIG ---
44+
if "selected_tone" not in st.session_state:
45+
st.session_state.selected_tone = "Compassionate Listener"
46+
47+
apply_global_font_size()
48+
49+
# --- 3. APPLY STYLES & CONFIGURATIONS ---
50+
apply_custom_css()
51+
model = configure_gemini()
52+
53+
# --- 4. TONE SELECTION DROPDOWN IN SIDEBAR ---
54+
TONE_OPTIONS = {
55+
"Compassionate Listener": "You are a compassionate listener — soft, empathetic, patient — like a therapist who listens without judgment.",
56+
"Motivating Coach": "You are a motivating coach — energetic, encouraging, and action-focused — helping the user push through rough days.",
57+
"Wise Friend": "You are a wise friend — thoughtful, poetic, and reflective — giving soulful responses and timeless advice.",
58+
"Neutral Therapist": "You are a neutral therapist — balanced, logical, and non-intrusive — asking guiding questions using CBT techniques.",
59+
"Mindfulness Guide": "You are a mindfulness guide — calm, slow, and grounding — focused on breathing, presence, and awareness."
60+
}
61+
62+
}
63+
4264
for key, val in default_values.items():
4365
if key not in st.session_state:
4466
st.session_state[key] = val
@@ -70,8 +92,13 @@
7092
render_emergency_page()
7193
else:
7294
render_header()
73-
st.subheader(f"🗣️ Current Chatbot Tone: **{st.session_state['selected_tone']}**")
74-
st.markdown(f"**🧠 Mood Selected:** {get_selected_mood()}")
95+
st.markdown(f"""
96+
<div style="text-align: center; margin: 20px 0;">
97+
<h3>🗣️ Current Chatbot Tone: <strong>{st.session_state['selected_tone']}</strong></h3>
98+
<p><strong>🧠 Mood Selected:</strong> {get_selected_mood()}</p>
99+
</div>
100+
""", unsafe_allow_html=True)
101+
75102
render_chat_interface()
76103
handle_chat_input(model=model, system_prompt=get_tone_prompt())
77104

assets/yoga_animation.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)