Gagan0141 commited on
Commit
e7afd1c
·
verified ·
1 Parent(s): 6c86d6d

Upload 10 files

Browse files
_virtual_chat.py ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # _virtual_chat.py
2
+ import queue
3
+ emotion_queue = queue.Queue()
4
+
5
+ from fer.fer import FER
6
+
7
+ # GPU optional – FER runs on CPU by default
8
+ emotion_detector = FER(mtcnn=True)
9
+
10
+ import streamlit as st
11
+ import cv2, time, os, tempfile, threading, datetime, glob, base64
12
+ import speech_recognition as sr
13
+ # from deepface import DeepFace
14
+ from db import get_db
15
+
16
+ import numpy as np
17
+
18
+ DEEPFACE_AVAILABLE = True
19
+ try:
20
+ import deepface
21
+ except:
22
+ DEEPFACE_AVAILABLE = False
23
+
24
+
25
+ def smooth_emotion_ema(emotion: str, confidence: float, alpha: float = 0.3):
26
+ ema = st.session_state.emotion_ema
27
+
28
+ if emotion not in ema:
29
+ ema[emotion] = confidence
30
+ else:
31
+ ema[emotion] = alpha * confidence + (1 - alpha) * ema[emotion]
32
+
33
+ # Decay other emotions
34
+ for e in list(ema.keys()):
35
+ if e != emotion:
36
+ ema[e] *= (1 - alpha)
37
+
38
+ # Pick strongest
39
+ smoothed_emotion = max(ema, key=ema.get)
40
+ return smoothed_emotion, ema[smoothed_emotion]
41
+
42
+
43
+ # ==================== Virtual Chat Mode ====================
44
+ def virtual_chat_mode(username=None, detect_text_emotion_func=None, retrieve_answer_func=None):
45
+ if username is None:
46
+ username = "Guest"
47
+
48
+ if detect_text_emotion_func is None:
49
+ def detect_text_emotion_func(text):
50
+ return "neutral", 0.5
51
+
52
+ if retrieve_answer_func is None:
53
+ def retrieve_answer_func(query, emotion):
54
+ return "I'm here to help. Please connect the RAG system."
55
+
56
+ st.title("🎥 Virtual Chat - Live Face Emotion Detection")
57
+
58
+ if not DEEPFACE_AVAILABLE:
59
+ st.error("⚠️ DeepFace library not installed. Please install it: `pip install deepface`")
60
+ return
61
+
62
+ st.info("📸 Camera stays open! Chat freely with text or voice - bot speaks back!")
63
+
64
+ EMOJI_MAP = {
65
+ "happy": "😄", "sad": "😢", "angry": "😠", "fear": "😨",
66
+ "neutral": "😐", "surprise": "😲", "disgust": "🤢"
67
+ }
68
+
69
+ # ==================== SESSION STATE ====================
70
+ for key, val in {
71
+ "live_emotion": "neutral",
72
+ "live_confidence": 0.0,
73
+ "camera_active": False,
74
+ "frame_counter": 0,
75
+ "cap": None,
76
+ "emotion_ema": {},
77
+ "virtual_chat_history": [],
78
+ "emotion_timeline": [],
79
+ "last_frame": None,
80
+ "detecting_emotion": False, # Flag to prevent multiple detections
81
+ }.items():
82
+ if key not in st.session_state:
83
+ st.session_state[key] = val
84
+
85
+ # ==================== TTS ====================
86
+ try:
87
+ import pyttsx3
88
+ tts_engine = pyttsx3.init()
89
+ tts_engine.setProperty('rate', 150)
90
+ tts_engine.available = True
91
+ except:
92
+ tts_engine = type('', (), {"available": False})()
93
+
94
+ def speak_async(text):
95
+ if not tts_engine.available:
96
+ return
97
+ def speak():
98
+ try:
99
+ tts_engine.say(text)
100
+ tts_engine.runAndWait()
101
+ except:
102
+ pass
103
+ threading.Thread(target=speak, daemon=True).start()
104
+
105
+ # ==================== ASYNC EMOTION DETECTION ====================
106
+ def detect_emotion_async(frame_copy):
107
+ if st.session_state.detecting_emotion:
108
+ return
109
+
110
+ st.session_state.detecting_emotion = True
111
+
112
+ def _detect():
113
+ try:
114
+ # FER expects RGB
115
+ rgb_frame = cv2.cvtColor(frame_copy, cv2.COLOR_BGR2RGB)
116
+
117
+ result = emotion_detector.detect_emotions(rgb_frame)
118
+
119
+ if not result:
120
+ return
121
+
122
+ # pick largest face
123
+ face = max(result, key=lambda r: r["box"][2] * r["box"][3])
124
+
125
+ emotions = face["emotions"]
126
+ emotion = max(emotions, key=emotions.get)
127
+ confidence = emotions[emotion]
128
+
129
+ emotion_queue.put((emotion, confidence))
130
+
131
+ except Exception:
132
+ pass
133
+ finally:
134
+ st.session_state.detecting_emotion = False
135
+
136
+ threading.Thread(target=_detect, daemon=True).start()
137
+
138
+ # ==================== CRISIS KEYWORDS ====================
139
+ CRISIS_KEYWORDS = ["suicide", "kill myself", "end my life", "i want to die", "harm myself"]
140
+
141
+ # ==================== LAYOUT ====================
142
+ col1, col2 = st.columns([1, 1])
143
+
144
+ # ==================== CAMERA ====================
145
+ with col1:
146
+ st.subheader("📹 Live Camera Feed")
147
+ st.metric(
148
+ "Your Current Emotion",
149
+ f"{EMOJI_MAP.get(st.session_state.live_emotion, '😐')} {st.session_state.live_emotion.title()}",
150
+ f"{st.session_state.live_confidence:.0%}"
151
+ )
152
+
153
+ btn_col1, btn_col2, btn_col3 = st.columns(3)
154
+
155
+ with btn_col1:
156
+ if not st.session_state.camera_active:
157
+ if st.button("📷 Start Camera", use_container_width=True):
158
+ try:
159
+ # Release any existing camera
160
+ if st.session_state.cap is not None:
161
+ st.session_state.cap.release()
162
+
163
+ # Open new camera
164
+ st.session_state.cap = cv2.VideoCapture(0)
165
+ st.session_state.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
166
+ st.session_state.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
167
+ st.session_state.cap.set(cv2.CAP_PROP_FPS, 30)
168
+ st.session_state.cap.set(cv2.CAP_PROP_BUFFERSIZE, 1)
169
+
170
+ if st.session_state.cap.isOpened():
171
+ st.session_state.camera_active = True
172
+ st.session_state.frame_counter = 0
173
+ st.success("✅ Camera started!")
174
+ else:
175
+ st.error("❌ Failed to open camera")
176
+ except Exception as e:
177
+ st.error(f"Camera error: {str(e)}")
178
+ st.rerun()
179
+ else:
180
+ if st.button("⏹ Stop Camera", use_container_width=True):
181
+ st.session_state.camera_active = False
182
+ if st.session_state.cap:
183
+ st.session_state.cap.release()
184
+ st.session_state.cap = None
185
+ save_session_to_mongo(username)
186
+ st.success("Camera stopped and session saved!")
187
+ st.rerun()
188
+
189
+ with btn_col2:
190
+ if st.button("📸 Snapshot", use_container_width=True, disabled=not st.session_state.camera_active):
191
+ if st.session_state.last_frame is not None:
192
+ os.makedirs("snapshots", exist_ok=True)
193
+ fname = f"snapshots/snap_{int(time.time())}.jpg"
194
+ cv2.imwrite(fname, st.session_state.last_frame)
195
+ st.success(f"📷 Saved!")
196
+
197
+ with btn_col3:
198
+ if st.button("🔄 Detect Now", use_container_width=True, disabled=not st.session_state.camera_active):
199
+ if st.session_state.last_frame is not None and not st.session_state.detecting_emotion:
200
+ detect_emotion_async(st.session_state.last_frame.copy())
201
+ st.info("🔍 Detecting...")
202
+
203
+ video_placeholder = st.empty()
204
+
205
+ # ==================== CAMERA LOOP ====================
206
+ if st.session_state.camera_active:
207
+
208
+ # ✅ Process emotion results from background thread
209
+ while not emotion_queue.empty():
210
+ emotion, confidence = emotion_queue.get()
211
+
212
+ smooth_e, smooth_c = smooth_emotion_ema(emotion, confidence)
213
+
214
+ st.session_state.live_emotion = smooth_e
215
+ st.session_state.live_confidence = smooth_c
216
+
217
+ st.session_state.emotion_timeline.append({
218
+ "timestamp": datetime.datetime.utcnow().isoformat(),
219
+ "raw_emotion": emotion,
220
+ "raw_confidence": confidence,
221
+ "smoothed_emotion": smooth_e,
222
+ "smoothed_confidence": smooth_c
223
+ })
224
+
225
+ st.session_state.detecting_emotion = False
226
+
227
+ # Ensure camera is open
228
+ if st.session_state.cap is None or not st.session_state.cap.isOpened():
229
+ st.session_state.cap = cv2.VideoCapture(0)
230
+ st.session_state.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
231
+ st.session_state.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
232
+
233
+ ret, frame = st.session_state.cap.read()
234
+
235
+ if ret:
236
+ frame = cv2.flip(frame, 1)
237
+ st.session_state.last_frame = frame.copy()
238
+ st.session_state.frame_counter += 1
239
+
240
+ # 🔍 Emotion detection every ~5 seconds (stable)
241
+ if (
242
+ st.session_state.frame_counter % 150 == 0
243
+ and not st.session_state.detecting_emotion
244
+ ):
245
+ detect_emotion_async(frame.copy())
246
+
247
+ # Overlay emotion
248
+ emotion_text = st.session_state.live_emotion.upper()
249
+ confidence_text = f"{st.session_state.live_confidence:.0%}"
250
+
251
+ cv2.rectangle(frame, (5, 5), (300, 70), (0, 0, 0), -1)
252
+ cv2.rectangle(frame, (5, 5), (300, 70), (0, 255, 0), 2)
253
+
254
+ cv2.putText(
255
+ frame, emotion_text, (15, 35),
256
+ cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 255, 0), 2
257
+ )
258
+ cv2.putText(
259
+ frame, confidence_text, (15, 60),
260
+ cv2.FONT_HERSHEY_SIMPLEX, 0.6, (255, 255, 255), 2
261
+ )
262
+
263
+ video_placeholder.image(frame.copy(), channels="BGR")
264
+ else:
265
+ video_placeholder.error("❌ Cannot read from camera")
266
+
267
+ # 🔁 Controlled rerun (ONLY when camera is active)
268
+ time.sleep(0.05) # ~20 FPS (CPU-safe)
269
+ st.rerun()
270
+
271
+
272
+ # ==================== CHAT ====================
273
+ with col2:
274
+ st.subheader("💬 Chat Interface")
275
+
276
+ # Display chat history in a scrollable container
277
+ chat_container = st.container()
278
+ with chat_container:
279
+ for m in st.session_state.virtual_chat_history:
280
+ with st.chat_message(m["role"]):
281
+ st.markdown(m["content"])
282
+
283
+ # Input mode selection (stays inside column)
284
+ input_mode = st.radio("Choose Input Mode:", ["💬 Type", "🎤 Speak"], horizontal=True)
285
+
286
+ # ==================== INPUT SECTION (OUTSIDE COLUMNS) ====================
287
+ user_input = ""
288
+
289
+ if input_mode == "💬 Type":
290
+ user_input = st.chat_input("Type your message here...")
291
+ else:
292
+ if st.button("🎤 Press & Speak", use_container_width=True):
293
+ recognizer = sr.Recognizer()
294
+ with st.spinner("🎤 Listening..."):
295
+ try:
296
+ with sr.Microphone() as source:
297
+ st.info("Speak now...")
298
+ recognizer.adjust_for_ambient_noise(source, duration=0.5)
299
+ audio = recognizer.listen(source, timeout=5, phrase_time_limit=10)
300
+ user_input = recognizer.recognize_google(audio)
301
+ st.success(f"✅ You said: {user_input}")
302
+ except sr.WaitTimeoutError:
303
+ st.error("⏱️ No speech detected")
304
+ except sr.UnknownValueError:
305
+ st.error("❌ Could not understand audio")
306
+ except Exception as e:
307
+ st.error(f"❌ Error: {str(e)}")
308
+
309
+ # ==================== PROCESS USER INPUT ====================
310
+ if user_input:
311
+ # Get emotions
312
+ face_emotion = st.session_state.live_emotion
313
+ face_confidence = st.session_state.live_confidence
314
+ text_emotion, text_confidence = detect_text_emotion_func(user_input)
315
+
316
+ # Choose emotion based on confidence
317
+ final_emotion = face_emotion if face_confidence > 0.5 else text_emotion
318
+
319
+ # Check for crisis keywords
320
+ is_crisis = any(keyword in user_input.lower() for keyword in CRISIS_KEYWORDS)
321
+
322
+ if is_crisis:
323
+ bot_reply = (
324
+ "⚠️ I'm very concerned about what you're sharing. Please reach out for help immediately:\n\n"
325
+ "🇮🇳 India Helplines:\n"
326
+ "• AASRA: 91-22-27546669\n"
327
+ "• Vandrevala Foundation: 1860-2662-345\n\n"
328
+ "You are not alone. Please talk to someone who can help."
329
+ )
330
+ else:
331
+ # Retrieve answer from RAG system
332
+ bot_reply = retrieve_answer_func(user_input, final_emotion)
333
+
334
+ # Add to chat history
335
+ st.session_state.virtual_chat_history.append({
336
+ "role": "user",
337
+ "content": user_input
338
+ })
339
+ st.session_state.virtual_chat_history.append({
340
+ "role": "assistant",
341
+ "content": bot_reply
342
+ })
343
+
344
+ # Speak the reply
345
+ speak_async(bot_reply)
346
+
347
+ st.rerun()
348
+
349
+ # ==================== SAVE TO MONGODB ====================
350
+ def save_session_to_mongo(username: str):
351
+ try:
352
+ db = get_db()
353
+ col = db["virtual_chat_sessions"]
354
+
355
+ # Read all snapshots
356
+ snapshot_data = []
357
+ if os.path.exists("snapshots"):
358
+ for f in glob.glob("snapshots/*.jpg"):
359
+ try:
360
+ with open(f, "rb") as img_file:
361
+ snapshot_data.append(
362
+ base64.b64encode(img_file.read()).decode("utf-8")
363
+ )
364
+ except Exception:
365
+ pass
366
+
367
+ doc = {
368
+ "username": username,
369
+ "timestamp": datetime.datetime.utcnow(),
370
+ "chat_history": st.session_state.virtual_chat_history,
371
+ "emotion_timeline": st.session_state.emotion_timeline,
372
+ "snapshots": snapshot_data,
373
+ "total_messages": len(st.session_state.virtual_chat_history),
374
+ "session_duration_emotions": len(st.session_state.emotion_timeline),
375
+ }
376
+
377
+ col.insert_one(doc)
378
+ st.success("✅ Virtual Chat Session saved to MongoDB")
379
+
380
+ except Exception as e:
381
+ st.warning("⚠️ Could not save session to database.")
app.py ADDED
@@ -0,0 +1,1307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ==================== STREAMLIT CONFIG (MUST BE FIRST) ====================
2
+ import streamlit as st
3
+
4
+ st.set_page_config(
5
+ page_title="MindSync AI ⭐",
6
+ page_icon="🌈",
7
+ layout="wide"
8
+ )
9
+
10
+ # ==================== IMPORTS ====================
11
+ import json, os, faiss, bcrypt, datetime
12
+ import numpy as np
13
+ import pandas as pd
14
+ import plotly.express as px
15
+ import plotly.graph_objects as go
16
+ import cv2
17
+ import pyttsx3
18
+ import threading
19
+ import tempfile
20
+ import time
21
+ from PIL import Image
22
+ import speech_recognition as sr
23
+ from deepface import DeepFace
24
+
25
+ # Local imports
26
+ import phase2_enhancements as phase2
27
+ import phase3_intervention as phase3
28
+ from _virtual_chat import virtual_chat_mode, save_session_to_mongo
29
+ from enhanced_rag_system import EnhancedRAGSystem, get_enhanced_response
30
+ from db import get_db
31
+ from ollama_llm import generate_with_ollama
32
+
33
+ # ==================== Database ====================
34
+ db = get_db()
35
+
36
+
37
+ # ==================== MENTAL HEALTH CONDITIONS ====================
38
+ MENTAL_HEALTH_CONDITIONS = {
39
+ "anxiety": {
40
+ "name": "Anxiety Disorders",
41
+ "icon": "😰",
42
+ "color": "#FF6B6B",
43
+ "description": "Excessive worry, fear, or nervousness that interferes with daily activities.",
44
+ "symptoms": [
45
+ "Persistent worrying or anxiety",
46
+ "Restlessness or feeling on edge",
47
+ "Difficulty concentrating",
48
+ "Muscle tension",
49
+ "Sleep disturbances",
50
+ "Rapid heartbeat or sweating",
51
+ "Avoiding situations that trigger anxiety"
52
+ ],
53
+ "types": [
54
+ "Generalized Anxiety Disorder (GAD)",
55
+ "Social Anxiety Disorder",
56
+ "Panic Disorder",
57
+ "Specific Phobias",
58
+ "Separation Anxiety"
59
+ ],
60
+ "non_medical_interventions": {
61
+ "breathing_techniques": {
62
+ "title": "Breathing & Relaxation",
63
+ "exercises": [
64
+ {
65
+ "name": "4-7-8 Breathing",
66
+ "description": "Inhale for 4 seconds, hold for 7, exhale for 8",
67
+ "duration": "5-10 minutes",
68
+ "best_for": "Quick calm during panic"
69
+ },
70
+ {
71
+ "name": "Box Breathing",
72
+ "description": "Inhale 4s → Hold 4s → Exhale 4s → Hold 4s",
73
+ "duration": "5 minutes",
74
+ "best_for": "Pre-stressful situations"
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ "when_to_seek_help": [
80
+ "Anxiety interferes with work, school, or relationships",
81
+ "You avoid many situations due to anxiety",
82
+ "Physical symptoms are severe (chest pain, dizziness)"
83
+ ],
84
+ "success_stories": [
85
+ "Sarah, 28: 'I used the exposure hierarchy to overcome my social anxiety. Started with ordering coffee, now I give presentations at work!'"
86
+ ]
87
+ },
88
+ "depression": {
89
+ "name": "Depression",
90
+ "icon": "😔",
91
+ "color": "#4A90E2",
92
+ "description": "Persistent feelings of sadness, hopelessness, and loss of interest in activities.",
93
+ "symptoms": [
94
+ "Persistent sad, empty, or hopeless mood",
95
+ "Loss of interest in activities once enjoyed",
96
+ "Changes in appetite or weight",
97
+ "Sleep problems (too much or too little)",
98
+ "Fatigue or loss of energy"
99
+ ],
100
+ "types": [
101
+ "Major Depressive Disorder",
102
+ "Persistent Depressive Disorder (Dysthymia)",
103
+ "Seasonal Affective Disorder (SAD)"
104
+ ],
105
+ "non_medical_interventions": {
106
+ "behavioral_activation": {
107
+ "title": "Behavioral Activation",
108
+ "exercises": [
109
+ {
110
+ "name": "Activity Scheduling",
111
+ "description": "Plan pleasurable and meaningful activities daily"
112
+ }
113
+ ]
114
+ }
115
+ },
116
+ "when_to_seek_help": [
117
+ "Thoughts of suicide or self-harm",
118
+ "Unable to function in daily life"
119
+ ],
120
+ "success_stories": [
121
+ "Priya, 31: 'Behavioral activation saved me. I forced myself to do one thing daily.'"
122
+ ]
123
+ },
124
+ "stress": {
125
+ "name": "Chronic Stress",
126
+ "icon": "😫",
127
+ "color": "#F39C12",
128
+ "description": "Prolonged physical and emotional strain that can lead to burnout.",
129
+ "symptoms": [
130
+ "Feeling overwhelmed or unable to cope",
131
+ "Irritability or mood swings",
132
+ "Difficulty relaxing or 'switching off'"
133
+ ],
134
+ "types": [
135
+ "Work-Related Stress",
136
+ "Academic Stress",
137
+ "Financial Stress"
138
+ ],
139
+ "non_medical_interventions": {
140
+ "stress_management": {
141
+ "title": "Immediate Stress Relief",
142
+ "techniques": [
143
+ {
144
+ "name": "STOP Technique",
145
+ "steps": [
146
+ "S - Stop what you're doing",
147
+ "T - Take a breath (3 deep breaths)",
148
+ "O - Observe your thoughts, feelings",
149
+ "P - Proceed mindfully"
150
+ ]
151
+ }
152
+ ]
153
+ }
154
+ },
155
+ "when_to_seek_help": [
156
+ "Physical health declining",
157
+ "Burnout symptoms"
158
+ ],
159
+ "success_stories": [
160
+ "David, 38: 'Implementing time blocking reduced my stress by 70%.'"
161
+ ]
162
+ }
163
+ }
164
+
165
+ # ==================== ASSESSMENT QUESTIONS (15 each) ====================
166
+ ASSESSMENT_QUESTIONS = {
167
+ "anxiety": [
168
+ {"question": "Over the last 2 weeks, how often have you felt nervous, anxious, or on edge?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
169
+ {"question": "How often have you been unable to stop or control worrying?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
170
+ {"question": "How often have you been worrying too much about different things?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
171
+ {"question": "How often have you had trouble relaxing?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
172
+ {"question": "How often have you been so restless that it's hard to sit still?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
173
+ {"question": "How often have you become easily annoyed or irritable?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
174
+ {"question": "How often have you felt afraid as if something awful might happen?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
175
+ {"question": "How often have you experienced heart racing or pounding?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
176
+ {"question": "How often have you had trouble concentrating on things?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
177
+ {"question": "How often have you experienced muscle tension or soreness?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
178
+ {"question": "How often have you avoided situations because they make you anxious?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
179
+ {"question": "How often have you had difficulty sleeping due to worry?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
180
+ {"question": "How often have you felt like you're losing control?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
181
+ {"question": "How often have you experienced sweating or trembling?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
182
+ {"question": "How often have you had intrusive worrying thoughts?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]}
183
+ ],
184
+ "depression": [
185
+ {"question": "Over the last 2 weeks, how often have you had little interest or pleasure in doing things?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
186
+ {"question": "How often have you felt down, depressed, or hopeless?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
187
+ {"question": "How often have you had trouble falling or staying asleep?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
188
+ {"question": "How often have you felt tired or had little energy?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
189
+ {"question": "How often have you had poor appetite or been overeating?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
190
+ {"question": "How often have you felt bad about yourself or that you're a failure?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
191
+ {"question": "How often have you had trouble concentrating on things?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
192
+ {"question": "How often have you moved or spoken so slowly that others noticed?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
193
+ {"question": "How often have you thought you would be better off dead?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
194
+ {"question": "How often have you felt isolated or withdrawn from others?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
195
+ {"question": "How often have you experienced unexplained crying spells?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
196
+ {"question": "How often have you felt worthless or excessively guilty?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
197
+ {"question": "How often have you lost interest in activities you used to enjoy?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
198
+ {"question": "How often have you had difficulty making decisions?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]},
199
+ {"question": "How often have you felt like life isn't worth living?", "options": ["Not at all", "Several days", "More than half the days", "Nearly every day"], "scores": [0, 1, 2, 3]}
200
+ ],
201
+ "stress": [
202
+ {"question": "In the last month, how often have you felt unable to control important things in your life?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
203
+ {"question": "How often have you felt difficulties were piling up so high you could not overcome them?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
204
+ {"question": "How often have you been upset because of something unexpected?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
205
+ {"question": "How often have you felt nervous and stressed?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
206
+ {"question": "How often have you felt confident about handling personal problems?", "options": ["Very often", "Fairly often", "Sometimes", "Almost never", "Never"], "scores": [0, 1, 2, 3, 4]},
207
+ {"question": "How often have you felt things were going your way?", "options": ["Very often", "Fairly often", "Sometimes", "Almost never", "Never"], "scores": [0, 1, 2, 3, 4]},
208
+ {"question": "How often have you found yourself unable to cope with all the things you had to do?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
209
+ {"question": "How often have you been able to control irritations in your life?", "options": ["Very often", "Fairly often", "Sometimes", "Almost never", "Never"], "scores": [0, 1, 2, 3, 4]},
210
+ {"question": "How often have you felt on top of things?", "options": ["Very often", "Fairly often", "Sometimes", "Almost never", "Never"], "scores": [0, 1, 2, 3, 4]},
211
+ {"question": "How often have you been angered by things outside your control?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
212
+ {"question": "How often have you felt overwhelmed by your responsibilities?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
213
+ {"question": "How often have you had trouble relaxing?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
214
+ {"question": "How often have you experienced physical symptoms of stress (headaches, stomach issues)?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
215
+ {"question": "How often have you felt like you're constantly racing against time?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]},
216
+ {"question": "How often have you had difficulty sleeping due to stress?", "options": ["Never", "Almost never", "Sometimes", "Fairly often", "Very often"], "scores": [0, 1, 2, 3, 4]}
217
+ ],
218
+ "ptsd": [
219
+ {"question": "How often have you had unwanted upsetting memories of the traumatic event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
220
+ {"question": "How often have you had nightmares about the traumatic event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
221
+ {"question": "How often have you felt as if the traumatic event was happening again?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
222
+ {"question": "How often have you felt very upset when reminded of the traumatic event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
223
+ {"question": "How often have you had strong physical reactions when reminded of the event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
224
+ {"question": "How often have you avoided memories, thoughts, or feelings about the event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
225
+ {"question": "How often have you avoided external reminders of the traumatic event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
226
+ {"question": "How often have you had trouble remembering important parts of the event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
227
+ {"question": "How often have you had strong negative beliefs about yourself or the world?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
228
+ {"question": "How often have you blamed yourself for the traumatic event?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
229
+ {"question": "How often have you had strong negative feelings (fear, horror, anger, guilt, shame)?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
230
+ {"question": "How often have you lost interest in activities you used to enjoy?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
231
+ {"question": "How often have you felt distant or cut off from other people?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
232
+ {"question": "How often have you been irritable or aggressive?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]},
233
+ {"question": "How often have you been overly alert or on guard?", "options": ["Not at all", "A little bit", "Moderately", "Quite a bit", "Extremely"], "scores": [0, 1, 2, 3, 4]}
234
+ ],
235
+ "insomnia": [
236
+ {"question": "How often do you have difficulty falling asleep?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
237
+ {"question": "How often do you wake up during the night?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
238
+ {"question": "How often do you wake up too early and can't go back to sleep?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
239
+ {"question": "How satisfied are you with your current sleep pattern?", "options": ["Very satisfied", "Satisfied", "Neutral", "Dissatisfied", "Very dissatisfied"], "scores": [0, 1, 2, 3, 4]},
240
+ {"question": "How noticeable is your sleep problem to others?", "options": ["Not noticeable", "Barely noticeable", "Somewhat noticeable", "Very noticeable", "Extremely noticeable"], "scores": [0, 1, 2, 3, 4]},
241
+ {"question": "How worried are you about your sleep problem?", "options": ["Not worried", "A little worried", "Somewhat worried", "Very worried", "Extremely worried"], "scores": [0, 1, 2, 3, 4]},
242
+ {"question": "How much does your sleep problem interfere with daily functioning?", "options": ["Not at all", "A little", "Somewhat", "Much", "Very much"], "scores": [0, 1, 2, 3, 4]},
243
+ {"question": "How often do you feel tired during the day?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
244
+ {"question": "How often do you use sleep medication or aids?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
245
+ {"question": "How often do you have difficulty concentrating due to lack of sleep?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
246
+ {"question": "How often do you feel irritable due to poor sleep?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
247
+ {"question": "How often does lack of sleep affect your mood?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
248
+ {"question": "How often do you worry about not being able to sleep?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
249
+ {"question": "How often do you feel unrefreshed after sleep?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]},
250
+ {"question": "How often does poor sleep affect your work or social life?", "options": ["Never", "Rarely", "Sometimes", "Often", "Always"], "scores": [0, 1, 2, 3, 4]}
251
+ ]
252
+ }
253
+
254
+ # ==================== DeepFace Check ====================
255
+ try:
256
+ from deepface import DeepFace
257
+ DEEPFACE_AVAILABLE = True
258
+ except ImportError:
259
+ DEEPFACE_AVAILABLE = False
260
+
261
+ # ==================== Database / RAG ====================
262
+
263
+ # @st.cache_resource
264
+ # def load_emotion_model():
265
+ # return pipeline("text-classification", model="j-hartmann/emotion-english-distilroberta-base", return_all_scores=True)
266
+
267
+ @st.cache_resource
268
+ def init_enhanced_rag():
269
+ return EnhancedRAGSystem(rag_directory="rag_knowledges")
270
+
271
+ #embedder, index, rag_inputs, rag_outputs = load_rag()
272
+ # emotion_classifier = load_emotion_model()
273
+ enhanced_rag= init_enhanced_rag()
274
+ #users_col, sessions_col, assessments_col = db["users"], db["sessions"], db["assessments"]
275
+ users_col, sessions_col, assessments_col = db["users"], db["sessions"], db["assessments"]
276
+ reminders_col = db["reminders"]
277
+ CRISIS_KEYWORDS = ["suicide", "kill myself", "end my life", "i want to die", "self harm","i don't want to live","i can't go on"]
278
+
279
+
280
+ # Initialize RAG
281
+ enhanced_rag = init_enhanced_rag()
282
+ # ==================== TTS Engine ====================
283
+ class TTSEngine:
284
+ def __init__(self):
285
+ try:
286
+ self.engine = pyttsx3.init()
287
+ self.engine.setProperty('rate', 150)
288
+ self.engine.setProperty('volume', 0.9)
289
+ self.available = True
290
+ except:
291
+ self.available = False
292
+
293
+ def speak(self, text):
294
+ if not self.available:
295
+ return
296
+ threading.Thread(target=lambda: self.engine.say(text) or self.engine.runAndWait(), daemon=True).start()
297
+
298
+ tts_engine = TTSEngine()
299
+
300
+ # ==================== Helpers ====================
301
+ def create_user(u, p,gender=None):
302
+ if users_col.find_one({"username": u}):
303
+ return False
304
+ hashed = bcrypt.hashpw(p.encode(), bcrypt.gensalt())
305
+ users_col.insert_one({"username": u, "password": hashed,"gender": gender, "created_at": datetime.datetime.utcnow()})
306
+ return True
307
+
308
+ def verify_user(u, p):
309
+ user = users_col.find_one({"username": u})
310
+ return bcrypt.checkpw(p.encode(), user["password"]) if user else False
311
+
312
+
313
+ def detect_text_emotion(text: str):
314
+ text = text.lower()
315
+
316
+ if any(w in text for w in ["happy", "joy", "excited", "amazing", "great"]):
317
+ return "joy", 0.9
318
+ elif any(w in text for w in ["sad", "down", "cry", "tired"]):
319
+ return "sadness", 0.9
320
+ elif any(w in text for w in ["angry", "frustrated", "mad"]):
321
+ return "anger", 0.9
322
+ elif any(w in text for w in ["fear", "panic", "afraid"]):
323
+ return "fear", 0.9
324
+ else:
325
+ return "neutral", 0.5
326
+
327
+
328
+ if confidence > 0.8:
329
+ return emotion, confidence
330
+
331
+ # Fallback to transformer model for uncertain cases
332
+ try:
333
+ res = emotion_classifier(text)[0]
334
+ best_emotion = max(res, key=lambda x: x["score"])
335
+ return best_emotion["label"], best_emotion["score"]
336
+ except:
337
+ return emotion, confidence
338
+
339
+
340
+ # def retrieve_answer(query, emotion=None):
341
+ # """Enhanced RAG retrieval with emotion-aware responses and motivational content"""
342
+
343
+ # # First try RAG knowledge base
344
+ # if rag_inputs and index is not None:
345
+ # try:
346
+ # q_emb = embedder.encode([query], convert_to_numpy=True)
347
+ # distances, indices = index.search(q_emb, 3) # Get top 3 matches
348
+
349
+ # # Get the best match
350
+ # best_match_idx = indices[0][0]
351
+ # best_distance = distances[0][0]
352
+
353
+ # # If distance is reasonable (similar enough), use RAG response
354
+ # if best_distance < 1.5: # Threshold for similarity
355
+ # base_response = rag_outputs[best_match_idx]
356
+
357
+ # # Enhance with emotion-specific motivation
358
+ # enhanced_response = enhance_response_with_motivation(base_response, emotion, query)
359
+ # return enhanced_response
360
+ # except:
361
+ # pass
362
+
363
+ # # Fallback: Generate contextual response based on emotion and keywords
364
+ # return generate_contextual_response(query, emotion)
365
+
366
+
367
+ def retrieve_answer(user_input, emotion):
368
+ rag_result = enhanced_rag.retrieve_response(user_input, emotion, top_k=3)
369
+
370
+ if rag_result and rag_result["confidence"] > 0.65:
371
+ return rag_result["combined"]
372
+
373
+ prompt = f"""
374
+ You are an empathetic mental health support assistant.
375
+ User emotion: {emotion}
376
+ User says: {user_input}
377
+
378
+ Respond calmly, safely, and supportively.
379
+ Do NOT provide medical diagnosis.
380
+ """
381
+
382
+ return generate_with_ollama(prompt)
383
+
384
+
385
+ def get_severity_level(condition, score, max_score):
386
+ """Determine severity level based on score"""
387
+ percentage = (score / max_score) * 100
388
+
389
+ if percentage <= 33:
390
+ return "Minimal"
391
+ elif percentage <= 66:
392
+ return "Moderate"
393
+ else:
394
+ return "Severe"
395
+
396
+ EMOJI_MAP = {"joy":"😊","sadness":"😢","anger":"😠","fear":"😰","surprise":"😲","neutral":"😐"}
397
+
398
+ # ==================== Session State ====================
399
+ if 'authenticated' not in st.session_state:
400
+ st.session_state.authenticated = False
401
+ #if 'username' not in st.session_state:
402
+ #st.session_state.username = None
403
+ if "username" not in st.session_state:
404
+ st.session_state.username = "guest"
405
+ if 'chat_history' not in st.session_state:
406
+ st.session_state.chat_history = []
407
+ if 'virtual_chat_history' not in st.session_state:
408
+ st.session_state.virtual_chat_history = []
409
+ if "gender" not in st.session_state:
410
+ st.session_state.gender = None # Will be set after login
411
+
412
+ # ==================== Authentication Page ====================
413
+ def auth_page():
414
+ st.title("🧠 Welcome to MindSync AI")
415
+ st.subheader("Login / Register")
416
+
417
+ tab1, tab2 = st.tabs(["Login", "Register"])
418
+
419
+ with tab1:
420
+ u = st.text_input("Username", key="auth_user")
421
+ p = st.text_input("Password", type="password", key="auth_pass")
422
+ if st.button("Login"):
423
+ if verify_user(u, p):
424
+ st.session_state.authenticated = True
425
+ st.session_state.username = u
426
+ user_data = users_col.find_one({"username": u})
427
+ st.session_state.gender = user_data.get("gender", "👤") # Default if not stored
428
+
429
+ st.success(f"Welcome back! {st.session_state.gender} {st.session_state.username}")
430
+ if st.session_state.gender is None:
431
+ st.session_state.gender = st.radio("Select your gender:", ["👨 Male", "👩 Female"])
432
+ st.rerun()
433
+ else:
434
+ st.error("Invalid credentials")
435
+
436
+ with tab2:
437
+ ru = st.text_input("New Username", key="reg_user")
438
+ rp = st.text_input("New Password", type="password", key="reg_pass")
439
+ rpp = st.text_input("Confirm Password", type="password", key="reg_pass2")
440
+ gender = st.radio("Select your gender:", ["👨 Male", "👩 Female"])
441
+ if st.button("Register"):
442
+ if rp != rpp:
443
+ st.error("Passwords don't match")
444
+ elif create_user(ru, rp):
445
+ st.success("Registered! Please login now.")
446
+ else:
447
+ st.error("Username already exists")
448
+ # ==================== Reminder System ====================
449
+ # Initialize reminder tracking in session state
450
+ if 'last_reminder_check' not in st.session_state:
451
+ st.session_state.last_reminder_check = datetime.datetime.now() - datetime.timedelta(minutes=10)
452
+ if 'shown_reminders' not in st.session_state:
453
+ st.session_state.shown_reminders = set()
454
+ if 'reminder_dismiss' not in st.session_state:
455
+ st.session_state.reminder_dismiss = {}
456
+
457
+ def show_pending_reminders(username):
458
+ """Show pending reminders as sidebar notifications"""
459
+ now = datetime.datetime.now()
460
+
461
+ # Only check every 5 minutes
462
+ time_since_check = (now - st.session_state.last_reminder_check).seconds
463
+ if time_since_check < 300:
464
+ return
465
+
466
+ st.session_state.last_reminder_check = now
467
+
468
+ try:
469
+ active_reminders = list(reminders_col.find({"username": username, "enabled": True}))
470
+ except:
471
+ return
472
+
473
+ if not active_reminders:
474
+ return
475
+
476
+ current_hour = now.hour
477
+ current_minute = now.minute
478
+ current_time_str = f"{current_hour}:{current_minute:02d}"
479
+ reminders_shown = []
480
+
481
+ for reminder in active_reminders:
482
+ reminder_type = reminder.get('type')
483
+ reminder_id = f"{reminder_type}_{current_time_str}"
484
+
485
+ if reminder_id in st.session_state.shown_reminders:
486
+ continue
487
+
488
+ dismiss_until = st.session_state.reminder_dismiss.get(reminder_id)
489
+ if dismiss_until and now < dismiss_until:
490
+ continue
491
+
492
+ if reminder_type == "checkin":
493
+ reminder_time = reminder.get('time', '20:00')
494
+ r_hour, r_minute = map(int, reminder_time.split(':'))
495
+
496
+ if r_hour == current_hour and abs(r_minute - current_minute) <= 5:
497
+ reminders_shown.append({
498
+ 'id': reminder_id,
499
+ 'title': '🔔 Mood Check-in Reminder',
500
+ 'message': 'Time to log your mood! Head to Mood Journal.',
501
+ 'color': 'warning'
502
+ })
503
+
504
+ elif reminder_type == "breathing":
505
+ frequency = reminder.get('frequency', 'Every 4 hours')
506
+ should_show = False
507
+
508
+ if frequency == "Every 2 hours":
509
+ should_show = current_hour % 2 == 0 and current_minute < 5
510
+ elif frequency == "Every 4 hours":
511
+ should_show = current_hour % 4 == 0 and current_minute < 5
512
+ elif frequency == "Twice daily":
513
+ should_show = current_hour in [9, 18] and current_minute < 5
514
+
515
+ if should_show:
516
+ reminders_shown.append({
517
+ 'id': reminder_id,
518
+ 'title': '🌬️ Breathing Exercise Reminder',
519
+ 'message': 'Take 2 minutes for a breathing break!',
520
+ 'color': 'info'
521
+ })
522
+
523
+ elif reminder_type == "goal":
524
+ frequency = reminder.get('frequency', 'Daily')
525
+ should_show = False
526
+
527
+ if frequency == "Daily":
528
+ should_show = current_hour == 9 and current_minute < 5
529
+ elif frequency == "Every 3 days":
530
+ day_of_year = now.timetuple().tm_yday
531
+ should_show = day_of_year % 3 == 0 and current_hour == 9 and current_minute < 5
532
+ elif frequency == "Weekly":
533
+ should_show = now.weekday() == 0 and current_hour == 9 and current_minute < 5
534
+
535
+ if should_show:
536
+ reminders_shown.append({
537
+ 'id': reminder_id,
538
+ 'title': '🎯 Goal Progress Check',
539
+ 'message': 'Review your wellness goals today!',
540
+ 'color': 'success'
541
+ })
542
+
543
+ if reminders_shown:
544
+ st.sidebar.markdown("---")
545
+ st.sidebar.markdown("### 🔔 Reminders")
546
+
547
+ for reminder in reminders_shown:
548
+ st.session_state.shown_reminders.add(reminder['id'])
549
+
550
+ if reminder['color'] == 'warning':
551
+ st.sidebar.warning(f"**{reminder['title']}**")
552
+ elif reminder['color'] == 'info':
553
+ st.sidebar.info(f"**{reminder['title']}**")
554
+ elif reminder['color'] == 'success':
555
+ st.sidebar.success(f"**{reminder['title']}**")
556
+
557
+ st.sidebar.caption(reminder['message'])
558
+
559
+ col1, col2 = st.sidebar.columns(2)
560
+ with col1:
561
+ if st.sidebar.button("✓ Got it", key=f"dismiss_{reminder['id']}", use_container_width=True):
562
+ st.rerun()
563
+ with col2:
564
+ if st.sidebar.button("⏰ Snooze", key=f"snooze_{reminder['id']}", use_container_width=True):
565
+ st.session_state.reminder_dismiss[reminder['id']] = now + datetime.timedelta(minutes=30)
566
+ st.rerun()
567
+
568
+ st.sidebar.markdown("---")
569
+
570
+ def clear_old_reminders():
571
+ """Clear reminder tracking daily"""
572
+ now = datetime.datetime.now()
573
+
574
+ if 'last_reminder_reset' not in st.session_state:
575
+ st.session_state.last_reminder_reset = now.date()
576
+
577
+ if st.session_state.last_reminder_reset < now.date():
578
+ st.session_state.shown_reminders = set()
579
+ st.session_state.reminder_dismiss = {}
580
+ st.session_state.last_reminder_reset = now.date()
581
+
582
+
583
+ # def detect_text_emotion(text: str):
584
+ # text = text.lower()
585
+
586
+ # if any(w in text for w in ["happy", "joy", "excited", "amazing", "great"]):
587
+ # return "joy", 0.9
588
+ # elif any(w in text for w in ["sad", "down", "cry", "tired"]):
589
+ # return "sadness", 0.9
590
+ # elif any(w in text for w in ["angry", "frustrated", "mad"]):
591
+ # return "anger", 0.9
592
+ # elif any(w in text for w in ["fear", "panic", "afraid"]):
593
+ # return "fear", 0.9
594
+ # else:
595
+ # return "neutral", 0.5
596
+
597
+
598
+ # ==================== NOW UPDATE YOUR chat_page() FUNCTION ====================
599
+
600
+ def chat_page():
601
+ if st.session_state.authenticated:
602
+ clear_old_reminders()
603
+ show_pending_reminders(st.session_state.username)
604
+
605
+ # Sidebar
606
+ with st.sidebar:
607
+ #st.title(f"👤 {st.session_state.username}")
608
+ user_emoji = st.session_state.get("gender", "👤")
609
+ st.title(f"{st.session_state.gender} {st.session_state.username}")
610
+
611
+ st.markdown("---")
612
+
613
+ # Radio selection
614
+ selected_page = st.radio("📍 Navigate", [
615
+ "💬 Chat",
616
+ "🎥 Virtual Chat",
617
+ "📊 Analytics",
618
+ "ℹ️ Resources",
619
+ # Phase 2
620
+ "🗓️ Mood Journal",
621
+ "🎯 Goals",
622
+ "📚 Exercises",
623
+ "🏆 Achievements",
624
+ "🔔 Reminders",
625
+ # Phase 3
626
+ "🎯 Coping Plans",
627
+ "📚 Resource Library",
628
+ "🎮 Interactive Tools"
629
+ ])
630
+
631
+ # Update session_state when selection changes
632
+ st.session_state.page = selected_page
633
+
634
+ if st.button("Logout"):
635
+ st.session_state.authenticated = False
636
+ st.session_state.username = None
637
+ st.session_state.chat_history = []
638
+ st.session_state.gender = None
639
+ st.session_state.virtual_chat_history = []
640
+ st.rerun()
641
+
642
+ # ------------------ Page Routing ------------------
643
+ page = st.session_state.page # always get latest selection
644
+
645
+ # Phase 3
646
+ if page in ["🎯 Coping Plans", "📚 Resource Library", "🎮 Interactive Tools"]:
647
+ phase3.phase3_main(st.session_state.username, page)
648
+
649
+ # Phase 2
650
+ elif page in ["🗓️ Mood Journal", "🎯 Goals", "📚 Exercises",
651
+ "🏆 Achievements", "🔔 Reminders"]:
652
+ phase2.phase2_main(st.session_state.username, page)
653
+
654
+ # Other pages
655
+ elif page == "💬 Chat":
656
+ chat_interface()
657
+ elif page == "🎥 Virtual Chat":
658
+ #virtual_chat_mode(st.session_state.username,detect_text_emotion_func=detect_text_emotion)
659
+ virtual_chat_mode(
660
+ username=st.session_state.username,
661
+ detect_text_emotion_func=detect_text_emotion,
662
+ retrieve_answer_func=retrieve_answer # Added this line
663
+ )
664
+
665
+ elif page == "📊 Analytics":
666
+ analytics_page()
667
+ elif page == "ℹ️ Resources":
668
+ resources_page()
669
+
670
+ # ==================== Text Chat ====================
671
+ def chat_interface():
672
+ st.title("💬 Text Chat")
673
+
674
+ for m in st.session_state.chat_history:
675
+ with st.chat_message(m['role']):
676
+ st.markdown(m['content'])
677
+ if 'emotion' in m and m['role'] == 'assistant':
678
+ st.caption(f"Detected emotion: {EMOJI_MAP.get(m['emotion'], '😐')} {m['emotion']}")
679
+
680
+ user_input = st.chat_input("Type your message here...")
681
+ if user_input:
682
+ text_emotion, _ = detect_text_emotion(user_input)
683
+ is_crisis = any(k in user_input.lower() for k in CRISIS_KEYWORDS)
684
+
685
+ if is_crisis:
686
+ bot_reply = """⚠️ I'm deeply concerned about what you're sharing. Your life matters.
687
+
688
+ 🆘 **Please reach out immediately**:
689
+ - AASRA: 91-22-27546669 (24/7)
690
+ - Vandrevala Foundation: 1860-2662-345 (24/7)
691
+ - iCall: 022-25521111
692
+
693
+ You don't have to face this alone. These helplines have trained counselors ready to listen and support you right now.
694
+
695
+ Please also tell someone you trust - a family member, friend, or colleague. You matter more than you know. 💙"""
696
+ else:
697
+ # Use enhanced retrieval with emotion awareness
698
+ bot_reply = retrieve_answer(user_input, text_emotion)
699
+
700
+ sessions_col.insert_one({
701
+ "username": st.session_state.username,
702
+ "user_text": user_input,
703
+ "bot_text": bot_reply,
704
+ "emotion": text_emotion,
705
+ "timestamp": datetime.datetime.utcnow()
706
+ })
707
+
708
+ st.session_state.chat_history.append({'role': 'user', 'content': user_input})
709
+ st.session_state.chat_history.append({'role': 'assistant', 'content': bot_reply, 'emotion': text_emotion})
710
+ st.rerun()
711
+
712
+ # ==================== Virtual Chat with Face Emotion ====================
713
+
714
+ # ==================== Analytics Page ====================
715
+ def analytics_page():
716
+ st.title("📊 Analytics Dashboard")
717
+ username = st.session_state.username
718
+
719
+ # Tabs for different analytics
720
+ tab1, tab2, tab3 = st.tabs(["💬 Chat Analytics", "📝 Assessment Reports", "📈 Combined Insights"])
721
+
722
+ # ==================== TAB 1: CHAT ANALYTICS ====================
723
+ with tab1:
724
+ cutoff = datetime.datetime.utcnow() - datetime.timedelta(days=30)
725
+ sessions = list(sessions_col.find({"username": username, "timestamp": {"$gte": cutoff}}))
726
+
727
+ if not sessions:
728
+ st.info("💡 Start chatting to see your analytics!")
729
+ return
730
+
731
+ df = pd.DataFrame(sessions)
732
+ df['timestamp'] = pd.to_datetime(df['timestamp'])
733
+ df['date'] = df['timestamp'].dt.date
734
+ df['hour'] = df['timestamp'].dt.hour
735
+ df['emotion'] = df.apply(lambda x: x.get('final_emotion') or x.get('emotion', 'neutral'), axis=1)
736
+
737
+ # Key Metrics
738
+ st.subheader("📈 Chat Metrics")
739
+ col1, col2, col3, col4 = st.columns(4)
740
+ with col1:
741
+ st.metric("Total Messages", len(sessions))
742
+ with col2:
743
+ st.metric("Most Common Emotion", df['emotion'].mode()[0].title() if len(df['emotion'].mode()) > 0 else "N/A")
744
+ with col3:
745
+ st.metric("Days Active", df['date'].nunique())
746
+ with col4:
747
+ avg_conf = df['face_confidence'].mean() if 'face_confidence' in df.columns else 0
748
+ st.metric("Avg Face Confidence", f"{avg_conf:.1%}")
749
+
750
+ # Emotion trends over time
751
+ st.subheader("📈 Emotion Trends Over Time")
752
+ emotion_over_time = df.groupby(['date', 'emotion']).size().reset_index(name='count')
753
+ fig = px.line(
754
+ emotion_over_time,
755
+ x='date',
756
+ y='count',
757
+ color='emotion',
758
+ title="Daily Emotion Patterns",
759
+ markers=True
760
+ )
761
+ st.plotly_chart(fig, use_container_width=True)
762
+
763
+ # Emotion distribution pie chart
764
+ st.subheader("🥧 Emotion Distribution")
765
+ col1, col2 = st.columns(2)
766
+
767
+ with col1:
768
+ fig2 = go.Figure(data=[go.Pie(
769
+ labels=df['emotion'].value_counts().index,
770
+ values=df['emotion'].value_counts().values,
771
+ hole=0.3,
772
+ marker=dict(colors=px.colors.qualitative.Set3)
773
+ )])
774
+ fig2.update_layout(title="Overall Emotion Distribution")
775
+ st.plotly_chart(fig2, use_container_width=True)
776
+
777
+ with col2:
778
+ # Hourly activity heatmap
779
+ hourly_data = df.groupby('hour').size().reset_index(name='count')
780
+ fig3 = px.bar(
781
+ hourly_data,
782
+ x='hour',
783
+ y='count',
784
+ title="Activity by Hour of Day",
785
+ labels={'hour': 'Hour', 'count': 'Number of Messages'}
786
+ )
787
+ st.plotly_chart(fig3, use_container_width=True)
788
+
789
+ # Scatter Plot - Face Confidence vs Text Emotion
790
+ st.subheader("📊 Face Confidence vs Emotion Analysis")
791
+
792
+ if 'face_confidence' in df.columns and 'face_emotion' in df.columns:
793
+ # Create scatter plot
794
+ fig4 = px.scatter(
795
+ df,
796
+ x='timestamp',
797
+ y='face_confidence',
798
+ color='face_emotion',
799
+ size=[10]*len(df),
800
+ hover_data=['user_text', 'emotion'],
801
+ title="Face Emotion Confidence Over Time",
802
+ labels={'face_confidence': 'Confidence Level', 'timestamp': 'Time'}
803
+ )
804
+ fig4.update_traces(marker=dict(size=12, line=dict(width=1, color='DarkSlateGrey')))
805
+ fig4.update_layout(height=400)
806
+ st.plotly_chart(fig4, use_container_width=True)
807
+
808
+ # Additional scatter: Emotion correlation
809
+ st.subheader("🔄 Text vs Face Emotion Match")
810
+ df['emotion_match'] = df.apply(
811
+ lambda x: 'Match' if x.get('face_emotion') == x.get('emotion') else 'Mismatch',
812
+ axis=1
813
+ )
814
+
815
+ fig5 = px.scatter(
816
+ df,
817
+ x='face_confidence',
818
+ y=df.index,
819
+ color='emotion_match',
820
+ hover_data=['face_emotion', 'emotion', 'user_text'],
821
+ title="Face vs Text Emotion Correlation",
822
+ labels={'face_confidence': 'Face Confidence', 'y': 'Session Index'},
823
+ color_discrete_map={'Match': '#00CC96', 'Mismatch': '#EF553B'}
824
+ )
825
+ st.plotly_chart(fig5, use_container_width=True)
826
+
827
+ # Stats
828
+ match_rate = (df['emotion_match'] == 'Match').sum() / len(df) * 100
829
+ st.info(f"📊 Face-Text Emotion Match Rate: **{match_rate:.1f}%**")
830
+ else:
831
+ st.info("💡 Use Virtual Chat with face detection to see face confidence analytics!")
832
+
833
+ # Weekly emotion summary
834
+ st.subheader("📅 Weekly Emotion Summary")
835
+ df['week'] = df['timestamp'].dt.to_period('W').astype(str)
836
+ weekly_emotions = df.groupby(['week', 'emotion']).size().reset_index(name='count')
837
+ fig6 = px.bar(
838
+ weekly_emotions,
839
+ x='week',
840
+ y='count',
841
+ color='emotion',
842
+ title="Weekly Emotion Breakdown",
843
+ barmode='stack'
844
+ )
845
+ st.plotly_chart(fig6, use_container_width=True)
846
+
847
+ # ==================== TAB 2: ASSESSMENT REPORTS ====================
848
+ with tab2:
849
+ st.subheader("📝 Mental Health Assessment History")
850
+
851
+ # Fetch all assessments for user
852
+ assessments = list(assessments_col.find({"username": username}).sort("timestamp", -1))
853
+
854
+ if not assessments:
855
+ st.info("💡 Take assessments in the Resources section to see reports here!")
856
+ return
857
+
858
+ # Convert to DataFrame
859
+ df_assess = pd.DataFrame(assessments)
860
+ df_assess['timestamp'] = pd.to_datetime(df_assess['timestamp'])
861
+ df_assess['date'] = df_assess['timestamp'].dt.date
862
+
863
+ # Summary metrics
864
+ st.subheader("📊 Assessment Summary")
865
+ col1, col2, col3 = st.columns(3)
866
+ with col1:
867
+ st.metric("Total Assessments", len(assessments))
868
+ with col2:
869
+ conditions_tested = df_assess['condition'].nunique()
870
+ st.metric("Conditions Tested", conditions_tested)
871
+ with col3:
872
+ most_recent = df_assess.iloc[0]['timestamp'].strftime("%Y-%m-%d")
873
+ st.metric("Last Assessment", most_recent)
874
+
875
+ # Assessment scores over time
876
+ st.subheader("📈 Assessment Scores Over Time")
877
+ fig_scores = px.line(
878
+ df_assess,
879
+ x='date',
880
+ y='percentage',
881
+ color='condition',
882
+ markers=True,
883
+ title="Assessment Score Trends (Percentage)",
884
+ labels={'percentage': 'Score (%)', 'date': 'Date', 'condition': 'Condition'}
885
+ )
886
+ st.plotly_chart(fig_scores, use_container_width=True)
887
+
888
+ # Condition-wise breakdown
889
+ st.subheader("🧩 Condition-wise Assessment Scores")
890
+
891
+ for condition in df_assess['condition'].unique():
892
+ with st.expander(f"📊 {MENTAL_HEALTH_CONDITIONS[condition]['icon']} {MENTAL_HEALTH_CONDITIONS[condition]['name']}"):
893
+ condition_data = df_assess[df_assess['condition'] == condition].sort_values('timestamp')
894
+
895
+ if len(condition_data) > 0:
896
+ # Line chart for this condition
897
+ fig_cond = go.Figure()
898
+ fig_cond.add_trace(go.Scatter(
899
+ x=condition_data['date'],
900
+ y=condition_data['score'],
901
+ mode='lines+markers',
902
+ name='Score',
903
+ line=dict(color=MENTAL_HEALTH_CONDITIONS[condition]['color'], width=3),
904
+ marker=dict(size=10)
905
+ ))
906
+ fig_cond.update_layout(
907
+ title=f"{MENTAL_HEALTH_CONDITIONS[condition]['name']} Progress",
908
+ xaxis_title="Date",
909
+ yaxis_title="Score",
910
+ height=300
911
+ )
912
+ st.plotly_chart(fig_cond, use_container_width=True)
913
+
914
+ # Latest assessment details
915
+ latest = condition_data.iloc[-1]
916
+ col1, col2, col3, col4 = st.columns(4)
917
+ with col1:
918
+ st.metric("Latest Score", f"{latest['score']}/{latest['max_score']}")
919
+ with col2:
920
+ st.metric("Percentage", f"{latest['percentage']:.1f}%")
921
+ with col3:
922
+ severity = get_severity_level(condition, latest['score'], latest['max_score'])
923
+ st.metric("Severity", severity)
924
+ with col4:
925
+ # Progress indicator
926
+ if len(condition_data) > 1:
927
+ prev_score = condition_data.iloc[-2]['percentage']
928
+ current_score = latest['percentage']
929
+ delta = current_score - prev_score
930
+ st.metric("Change", f"{delta:+.1f}%", delta=f"{delta:+.1f}%")
931
+ else:
932
+ st.metric("Assessments", "1")
933
+
934
+ # Historical table
935
+ st.markdown("##### Assessment History")
936
+ history_table = condition_data[['date', 'score', 'max_score', 'percentage']].copy()
937
+ history_table['percentage'] = history_table['percentage'].round(1).astype(str) + '%'
938
+ history_table.columns = ['Date', 'Score', 'Max Score', 'Percentage']
939
+ st.dataframe(history_table, use_container_width=True, hide_index=True)
940
+
941
+ # Overall severity heatmap
942
+ st.subheader("🌡️ Severity Heatmap")
943
+ severity_data = df_assess.pivot_table(
944
+ values='percentage',
945
+ index='condition',
946
+ columns='date',
947
+ aggfunc='mean'
948
+ )
949
+
950
+ fig_heatmap = px.imshow(
951
+ severity_data,
952
+ labels=dict(x="Date", y="Condition", color="Severity %"),
953
+ color_continuous_scale="RdYlGn_r",
954
+ title="Assessment Severity Over Time"
955
+ )
956
+ st.plotly_chart(fig_heatmap, use_container_width=True)
957
+
958
+ # ==================== TAB 3: COMBINED INSIGHTS ====================
959
+ with tab3:
960
+ st.subheader("📈 Combined Mental Health Insights")
961
+
962
+ # Check if we have both chat and assessment data
963
+ if not sessions:
964
+ st.info("💡 No chat data available yet!")
965
+ return
966
+ if not assessments:
967
+ st.info("💡 No assessment data available yet!")
968
+ return
969
+
970
+ st.markdown("""
971
+ This section combines your chat emotions with assessment scores to provide comprehensive insights.
972
+ """)
973
+
974
+ # Emotion vs Assessment correlation
975
+ st.subheader("🔗 Emotion Patterns vs Assessment Scores")
976
+
977
+ # Get dominant emotions per day
978
+ df_emotions_daily = df.groupby(['date', 'emotion']).size().reset_index(name='count')
979
+ dominant_emotion_per_day = df_emotions_daily.loc[df_emotions_daily.groupby('date')['count'].idxmax()]
980
+
981
+ # Merge with assessments
982
+ df_merged = pd.merge(
983
+ df_assess[['date', 'condition', 'percentage']],
984
+ dominant_emotion_per_day[['date', 'emotion']],
985
+ on='date',
986
+ how='left'
987
+ )
988
+ # **FIX: Remove rows with NaN values in percentage or emotion**
989
+ df_merged = df_merged.dropna(subset=['percentage', 'emotion'])
990
+
991
+ if not df_merged.empty:
992
+ fig_combined = px.scatter(
993
+ df_merged,
994
+ x='date',
995
+ y='percentage',
996
+ color='emotion',
997
+ size=[10]*len(df_merged),
998
+ hover_data=['condition'],
999
+ title="Assessment Scores vs Daily Dominant Emotion",
1000
+ labels={'percentage': 'Assessment Score (%)', 'date': 'Date'}
1001
+ )
1002
+ st.plotly_chart(fig_combined, use_container_width=True)
1003
+ else:
1004
+ st.info("💡 No overlapping data between chat emotions and assessments on the same days yet!")
1005
+ # Wellness Score
1006
+ st.subheader("💯 Overall Wellness Score")
1007
+
1008
+ # Calculate wellness score (inverted assessment scores + positive emotion ratio)
1009
+ avg_assessment_score = df_assess['percentage'].mean()
1010
+ positive_emotions = ['joy', 'surprise']
1011
+ positive_ratio = (df['emotion'].isin(positive_emotions).sum() / len(df)) * 100
1012
+
1013
+ wellness_score = ((100 - avg_assessment_score) + positive_ratio) / 2
1014
+
1015
+ col1, col2, col3 = st.columns(3)
1016
+ with col1:
1017
+ st.metric("Wellness Score", f"{wellness_score:.1f}/100")
1018
+ with col2:
1019
+ st.metric("Positive Emotion %", f"{positive_ratio:.1f}%")
1020
+ with col3:
1021
+ st.metric("Avg Assessment Score", f"{avg_assessment_score:.1f}%")
1022
+
1023
+ # Gauge chart for wellness score
1024
+ fig_gauge = go.Figure(go.Indicator(
1025
+ mode="gauge+number+delta",
1026
+ value=wellness_score,
1027
+ domain={'x': [0, 1], 'y': [0, 1]},
1028
+ title={'text': "Overall Wellness Score"},
1029
+ gauge={
1030
+ 'axis': {'range': [None, 100]},
1031
+ 'bar': {'color': "darkblue"},
1032
+ 'steps': [
1033
+ {'range': [0, 33], 'color': "lightcoral"},
1034
+ {'range': [33, 66], 'color': "lightyellow"},
1035
+ {'range': [66, 100], 'color': "lightgreen"}
1036
+ ],
1037
+ 'threshold': {
1038
+ 'line': {'color': "red", 'width': 4},
1039
+ 'thickness': 0.75,
1040
+ 'value': 90
1041
+ }
1042
+ }
1043
+ ))
1044
+ st.plotly_chart(fig_gauge, use_container_width=True)
1045
+
1046
+ # Recommendations
1047
+ st.subheader("💡 Personalized Recommendations")
1048
+
1049
+ if wellness_score >= 70:
1050
+ st.success("""
1051
+ 🌟 **Great job!** Your mental health metrics are positive!
1052
+ - Keep up your healthy routines
1053
+ - Continue social connections
1054
+ - Maintain work-life balance
1055
+ """)
1056
+ elif wellness_score >= 40:
1057
+ st.warning("""
1058
+ ⚠️ **Room for improvement**
1059
+ - Increase physical activity (30 min daily)
1060
+ - Practice daily mindfulness or meditation
1061
+ - Strengthen social connections
1062
+ - Consider self-help resources in the app
1063
+ """)
1064
+ else:
1065
+ st.error("""
1066
+ 🆘 **Attention needed**
1067
+ - Your metrics suggest you may be struggling
1068
+ - Strongly consider professional mental health support
1069
+ - Use crisis helplines if in distress
1070
+ - Implement daily self-care routines
1071
+ - Reach out to trusted friends/family
1072
+ """)
1073
+
1074
+ # Download report button
1075
+ if st.button("📥 Download Full Report (CSV)"):
1076
+ # Combine data for download
1077
+ report_data = {
1078
+ 'Chat Sessions': len(sessions),
1079
+ 'Assessments Taken': len(assessments),
1080
+ 'Wellness Score': wellness_score,
1081
+ 'Positive Emotion %': positive_ratio,
1082
+ 'Average Assessment Score': avg_assessment_score
1083
+ }
1084
+
1085
+ st.download_button(
1086
+ label="Download Report",
1087
+ data=str(report_data),
1088
+ file_name=f"mental_health_report_{username}_{datetime.datetime.now().strftime('%Y%m%d')}.txt",
1089
+ mime="text/plain"
1090
+ )
1091
+
1092
+ # ==================== Resources Page with Quizzes ====================
1093
+ def resources_page():
1094
+ st.title("ℹ️ Mental Health Resources")
1095
+
1096
+ tab1, tab2, tab3 = st.tabs(["🆘 Crisis Helplines", "📝 Self-Assessments", "💡 Self-Help"])
1097
+
1098
+ with tab1:
1099
+ st.subheader("🆘 Crisis Helplines (India)")
1100
+ helplines = {
1101
+ "AASRA": "91-22-27546669",
1102
+ "Vandrevala Foundation": "1860-2662-345",
1103
+ "iCall": "022-25521111",
1104
+ "Snehi": "91-22-27546669"
1105
+ }
1106
+ for org, contact in helplines.items():
1107
+ st.info(f"**{org}**: {contact}")
1108
+
1109
+ with tab2:
1110
+ st.subheader("📝 Mental Health Self-Assessments")
1111
+
1112
+ condition = st.selectbox(
1113
+ "Select a condition to assess:",
1114
+ list(MENTAL_HEALTH_CONDITIONS.keys()),
1115
+ format_func=lambda x: MENTAL_HEALTH_CONDITIONS[x]["name"]
1116
+ )
1117
+
1118
+ data = MENTAL_HEALTH_CONDITIONS[condition]
1119
+
1120
+ st.markdown(f"## {data['icon']} {data['name']}")
1121
+ st.markdown(data["description"])
1122
+
1123
+ with st.expander("📋 View Symptoms & Types"):
1124
+ col1, col2 = st.columns(2)
1125
+ with col1:
1126
+ st.markdown("### Symptoms")
1127
+ for s in data["symptoms"]:
1128
+ st.write(f"• {s}")
1129
+ with col2:
1130
+ st.markdown("### Types")
1131
+ for t in data["types"]:
1132
+ st.write(f"• {t}")
1133
+
1134
+ # Assessment Quiz
1135
+ if condition in ASSESSMENT_QUESTIONS:
1136
+ st.markdown("---")
1137
+ st.subheader(f"📝 {data['name']} Assessment Quiz (15 Questions)")
1138
+ st.info("💡 This comprehensive assessment helps identify symptoms. Answer honestly for accurate results.")
1139
+
1140
+ questions = ASSESSMENT_QUESTIONS[condition]
1141
+ total_score = 0
1142
+ max_score = sum([max(q["scores"]) for q in questions])
1143
+
1144
+ # Use form for better UX
1145
+ with st.form(key=f"quiz_form_{condition}"):
1146
+ for idx, q in enumerate(questions):
1147
+ st.markdown(f"**Question {idx + 1}/15:**")
1148
+ choice = st.radio(
1149
+ q["question"],
1150
+ q["options"],
1151
+ key=f"{condition}_q{idx}"
1152
+ )
1153
+ score_index = q["options"].index(choice)
1154
+ total_score += q["scores"][score_index]
1155
+
1156
+ submitted = st.form_submit_button("📊 Submit & View Results")
1157
+
1158
+ if submitted:
1159
+ # Calculate percentage
1160
+ percentage = (total_score / max_score) * 100
1161
+
1162
+ # Save to database
1163
+ assessment_record = {
1164
+ "username": st.session_state.username,
1165
+ "condition": condition,
1166
+ "score": total_score,
1167
+ "max_score": max_score,
1168
+ "percentage": percentage,
1169
+ "timestamp": datetime.datetime.utcnow()
1170
+ }
1171
+ assessments_col.insert_one(assessment_record)
1172
+
1173
+ st.markdown("---")
1174
+ st.markdown(f"### 📊 Your Assessment Results")
1175
+
1176
+ # Score display
1177
+ col1, col2, col3 = st.columns(3)
1178
+ with col1:
1179
+ st.metric("Total Score", f"{total_score}/{max_score}")
1180
+ with col2:
1181
+ st.metric("Percentage", f"{percentage:.1f}%")
1182
+ with col3:
1183
+ severity = get_severity_level(condition, total_score, max_score)
1184
+ st.metric("Severity", severity)
1185
+
1186
+ # Progress bar
1187
+ st.progress(total_score / max_score)
1188
+
1189
+ # Interpretation based on condition
1190
+ st.markdown("### 🔍 Interpretation")
1191
+
1192
+ if condition == "anxiety":
1193
+ if total_score <= 15:
1194
+ st.success("🟢 **Minimal Anxiety** - You're experiencing low levels of anxiety.")
1195
+ recommendation = "Continue healthy habits like exercise, good sleep, and stress management."
1196
+ elif total_score <= 30:
1197
+ st.warning("🟡 **Mild to Moderate Anxiety** - You're experiencing noticeable anxiety symptoms.")
1198
+ recommendation = "Consider self-help strategies, breathing exercises, and lifestyle changes. Monitor your symptoms."
1199
+ else:
1200
+ st.error("🔴 **Moderate to Severe Anxiety** - You're experiencing significant anxiety that may be interfering with daily life.")
1201
+ recommendation = "Strongly consider consulting a mental health professional. Self-help strategies can supplement professional treatment."
1202
+
1203
+ elif condition == "depression":
1204
+ if total_score <= 15:
1205
+ st.success("🟢 **Minimal Depression** - You're experiencing few depressive symptoms.")
1206
+ recommendation = "Maintain healthy routines, social connections, and activities you enjoy."
1207
+ elif total_score <= 30:
1208
+ st.warning("🟡 **Mild to Moderate Depression** - You're experiencing noticeable depressive symptoms.")
1209
+ recommendation = "Try behavioral activation, regular exercise, and social engagement. Consider therapy if symptoms persist."
1210
+ else:
1211
+ st.error("🔴 **Moderate to Severe Depression** - You're experiencing significant depression.")
1212
+ recommendation = "Professional help is strongly recommended. Depression is treatable - please reach out to a mental health provider."
1213
+
1214
+ elif condition == "stress":
1215
+ if total_score <= 20:
1216
+ st.success("🟢 **Low Stress** - You're managing stress well.")
1217
+ recommendation = "Continue your current coping strategies and maintain work-life balance."
1218
+ elif total_score <= 40:
1219
+ st.warning("🟡 **Moderate Stress** - You're experiencing considerable stress.")
1220
+ recommendation = "Implement stress management techniques: time management, relaxation practices, and setting boundaries."
1221
+ else:
1222
+ st.error("🔴 **High Stress** - You're experiencing very high stress levels.")
1223
+ recommendation = "Urgent lifestyle changes needed. Consider reducing commitments, seeking support, and possibly professional counseling."
1224
+
1225
+ elif condition == "ptsd":
1226
+ if total_score <= 20:
1227
+ st.success("🟢 **Minimal PTSD Symptoms** - You're experiencing few trauma-related symptoms.")
1228
+ recommendation = "Continue self-care and processing strategies. Reach out for support if symptoms increase."
1229
+ elif total_score <= 40:
1230
+ st.warning("🟡 **Mild to Moderate PTSD** - You're experiencing noticeable trauma symptoms.")
1231
+ recommendation = "Grounding techniques and support groups may help. Consider trauma-focused therapy like EMDR or CPT."
1232
+ else:
1233
+ st.error("🔴 **Moderate to Severe PTSD** - You're experiencing significant trauma symptoms.")
1234
+ recommendation = "Professional trauma therapy is strongly recommended. PTSD is highly treatable with specialized approaches."
1235
+
1236
+ elif condition == "insomnia":
1237
+ if total_score <= 20:
1238
+ st.success("🟢 **Minimal Sleep Issues** - Your sleep is relatively good.")
1239
+ recommendation = "Maintain good sleep hygiene and consistent sleep schedule."
1240
+ elif total_score <= 40:
1241
+ st.warning("🟡 **Moderate Insomnia** - You're experiencing noticeable sleep difficulties.")
1242
+ recommendation = "Try CBT-I techniques: sleep restriction, stimulus control, and sleep hygiene improvements."
1243
+ else:
1244
+ st.error("🔴 **Severe Insomnia** - You're experiencing significant sleep problems.")
1245
+ recommendation = "Consider consulting a sleep specialist. CBT-I (cognitive behavioral therapy for insomnia) is highly effective."
1246
+
1247
+ st.info(f"💡 **Recommendation**: {recommendation}")
1248
+
1249
+ st.warning("⚠️ **Important**: This is a screening tool, NOT a medical diagnosis. Please consult a qualified mental health professional for accurate assessment and treatment.")
1250
+
1251
+ # Action buttons
1252
+ col1, col2 = st.columns(2)
1253
+ with col1:
1254
+ if st.button("📈 View My Assessment History"):
1255
+ st.session_state.view_assessment_history = True
1256
+ with col2:
1257
+ if st.button("📞 Find Professional Help"):
1258
+ st.info("Check the Crisis Helplines tab for professional resources.")
1259
+
1260
+ # Interventions
1261
+ st.markdown("---")
1262
+ st.subheader("🛠️ Non-Medical Interventions")
1263
+ for section_key, section in data["non_medical_interventions"].items():
1264
+ with st.expander(section["title"]):
1265
+ for key, value in section.items():
1266
+ if isinstance(value, list):
1267
+ for item in value:
1268
+ if isinstance(item, dict):
1269
+ st.markdown(f"**{item.get('name', '')}**")
1270
+ st.write(item.get('description', ''))
1271
+ else:
1272
+ st.write(f"• {item}")
1273
+
1274
+ # Success Stories
1275
+ with st.expander("🌟 Success Stories"):
1276
+ for story in data["success_stories"]:
1277
+ st.success(story)
1278
+
1279
+ # When to Seek Help
1280
+ with st.expander("🆘 When to Seek Professional Help"):
1281
+ for item in data["when_to_seek_help"]:
1282
+ st.warning(item)
1283
+
1284
+ with tab3:
1285
+ st.subheader("💡 Quick Self-Help Tips")
1286
+ st.markdown("""
1287
+ ### Breathing Exercises
1288
+ - **4-7-8 Breathing**: Inhale 4s, hold 7s, exhale 8s
1289
+ - **Box Breathing**: Inhale 4s, hold 4s, exhale 4s, hold 4s
1290
+
1291
+ ### Daily Wellness
1292
+ - 🌅 Morning sunlight (15-30 min)
1293
+ - 🏃 Exercise (30 min daily)
1294
+ - 😴 Sleep consistency (7-9 hours)
1295
+ - 📝 Journaling
1296
+ - 🧘 Meditation (5-10 min)
1297
+ """)
1298
+
1299
+ # ==================== Main Entry Point ====================
1300
+ def main():
1301
+ if not st.session_state.authenticated:
1302
+ auth_page()
1303
+ else:
1304
+ chat_page()
1305
+
1306
+ if __name__ == "__main__":
1307
+ main()
enhanced_rag_system.py ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ enhanced_rag_system.py
3
+ Complete RAG knowledge base that combines JSON files + conversational AI
4
+ Optimized for AI Therapist with emotional support
5
+ """
6
+
7
+ import json
8
+ import os
9
+ import numpy as np
10
+ from sentence_transformers import SentenceTransformer
11
+
12
+ class EnhancedRAGSystem:
13
+ def __init__(self, rag_directory="rag_knowledges"):
14
+ self.rag_dir = rag_directory
15
+ self.knowledge_base = []
16
+ self.embedder = None
17
+ self.index = None
18
+
19
+ # Load all knowledge
20
+ self.load_all_knowledge()
21
+ self.build_index()
22
+
23
+ def load_all_knowledge(self):
24
+ """Load all JSON files from rag_knowledges folder"""
25
+ if not os.path.exists(self.rag_dir):
26
+ print(f"Warning: {self.rag_dir} folder not found!")
27
+ return
28
+
29
+ for file in os.listdir(self.rag_dir):
30
+ if file.endswith('.json'):
31
+ filepath = os.path.join(self.rag_dir, file)
32
+ try:
33
+ with open(filepath, 'r', encoding='utf-8') as f:
34
+ data = json.load(f)
35
+
36
+ # Add emotion category from filename
37
+ emotion_category = file.replace('.json', '')
38
+
39
+ for item in data:
40
+ self.knowledge_base.append({
41
+ 'user_input': item.get('user_input', ''),
42
+ 'bot_response': item.get('bot_response', ''),
43
+ 'bot_followup': item.get('bot_followup', ''),
44
+ 'emotion_category': emotion_category,
45
+ 'combined_response': f"{item.get('bot_response', '')} {item.get('bot_followup', '')}"
46
+ })
47
+
48
+ print(f"✅ Loaded {len(data)} entries from {file}")
49
+ except Exception as e:
50
+ print(f"❌ Error loading {file}: {e}")
51
+
52
+ def build_index(self):
53
+ """Build FAISS index for semantic search"""
54
+ if not self.knowledge_base:
55
+ print("No knowledge base loaded!")
56
+ return
57
+
58
+ try:
59
+ import faiss
60
+
61
+ # Initialize embedder
62
+ self.embedder = SentenceTransformer('all-MiniLM-L6-v2')
63
+
64
+ # Create embeddings for all user inputs
65
+ user_inputs = [item['user_input'] for item in self.knowledge_base]
66
+ embeddings = self.embedder.encode(user_inputs, convert_to_numpy=True)
67
+
68
+ # Build FAISS index
69
+ dimension = embeddings.shape[1]
70
+ self.index = faiss.IndexFlatL2(dimension)
71
+ self.index.add(embeddings)
72
+
73
+ print(f"✅ Built FAISS index with {len(self.knowledge_base)} entries")
74
+ except Exception as e:
75
+ print(f"❌ Error building index: {e}")
76
+
77
+ def retrieve_response(self, query, emotion=None, top_k=3):
78
+ """
79
+ Retrieve best response from RAG knowledge base
80
+
81
+ Args:
82
+ query: User's question/input
83
+ emotion: Detected emotion (optional, for filtering)
84
+ top_k: Number of top results to consider
85
+
86
+ Returns:
87
+ dict with response and metadata
88
+ """
89
+ if not self.index or not self.embedder:
90
+ return None
91
+
92
+ try:
93
+ # Encode query
94
+ query_embedding = self.embedder.encode([query], convert_to_numpy=True)
95
+
96
+ # Search in FAISS index
97
+ distances, indices = self.index.search(query_embedding, top_k * 2) # Get more to filter
98
+
99
+ # Filter by emotion if provided
100
+ candidates = []
101
+ for dist, idx in zip(distances[0], indices[0]):
102
+ if idx < len(self.knowledge_base):
103
+ item = self.knowledge_base[idx]
104
+
105
+ # If emotion matches category, prioritize it
106
+ if emotion and emotion.lower() in item['emotion_category'].lower():
107
+ candidates.insert(0, {
108
+ 'distance': dist,
109
+ 'item': item
110
+ })
111
+ else:
112
+ candidates.append({
113
+ 'distance': dist,
114
+ 'item': item
115
+ })
116
+
117
+ # Get best match
118
+ if candidates:
119
+ best = candidates[0]['item']
120
+
121
+ return {
122
+ 'response': best['bot_response'],
123
+ 'followup': best['bot_followup'],
124
+ 'combined': best['combined_response'],
125
+ 'emotion_category': best['emotion_category'],
126
+ 'distance': float(candidates[0]['distance']),
127
+ 'confidence': self._calculate_confidence(candidates[0]['distance'])
128
+ }
129
+
130
+ except Exception as e:
131
+ print(f"Error retrieving response: {e}")
132
+
133
+ return None
134
+
135
+ def _calculate_confidence(self, distance):
136
+ """Calculate confidence score from distance (0-1)"""
137
+ # Lower distance = higher confidence
138
+ # Typical distances range from 0 to 2
139
+ confidence = max(0, min(1, 1 - (distance / 2)))
140
+ return confidence
141
+
142
+
143
+ # ==================== INTEGRATION WITH MAIN APP ====================
144
+
145
+ def get_enhanced_response(user_input, emotion, rag_system):
146
+ """
147
+ Main function to get response - tries RAG first, then fallback
148
+
149
+ Args:
150
+ user_input: User's message
151
+ emotion: Detected emotion
152
+ rag_system: EnhancedRAGSystem instance
153
+
154
+ Returns:
155
+ Chatbot response string
156
+ """
157
+
158
+ # Try RAG knowledge base first
159
+ rag_result = rag_system.retrieve_response(user_input, emotion, top_k=3)
160
+
161
+ if rag_result and rag_result['confidence'] > 0.6: # Good match
162
+ # Use RAG response
163
+ return rag_result['combined']
164
+
165
+ # Fallback to contextual responses (from chatbot_responses.py)
166
+ from ollama_llm import generate_response
167
+
168
+ def get_enhanced_response(user_input, emotion, rag_system):
169
+ rag_result = rag_system.retrieve_response(user_input, emotion, top_k=3)
170
+
171
+ if rag_result and rag_result["confidence"] > 0.6:
172
+ return rag_result["combined"]
173
+
174
+ prompt = f"""
175
+ You are an empathetic mental health support assistant.
176
+ User emotion: {emotion}
177
+ User message: {user_input}
178
+
179
+ Respond calmly, safely, and supportively.
180
+ Avoid giving medical diagnoses.
181
+ """
182
+
183
+ return generate_response(prompt)
184
+
185
+
186
+
187
+ # ==================== USAGE EXAMPLE ====================
188
+
189
+ if __name__ == "__main__":
190
+ # Initialize RAG system
191
+ rag = EnhancedRAGSystem(rag_directory="rag_knowledges")
192
+
193
+ # Test queries
194
+ test_queries = [
195
+ ("I passed my exam today!", "joy"),
196
+ ("I'm feeling really sad and lonely", "sadness"),
197
+ ("I got promoted at work", "happiness"),
198
+ ("Hey, what's up?", "neutral"),
199
+ ("I'm so stressed about my exams", "anxiety"),
200
+ ("I came from school and got hurt through bus", "sadness")
201
+ ]
202
+
203
+ print("\n" + "="*80)
204
+ print("TESTING ENHANCED RAG SYSTEM")
205
+ print("="*80 + "\n")
206
+
207
+ for query, emotion in test_queries:
208
+ print(f"USER ({emotion}): {query}")
209
+
210
+ # Get response
211
+ response = get_enhanced_response(query, emotion, rag)
212
+
213
+ print(f"BOT: {response[:200]}...")
214
+ print("-" * 80 + "\n")
phase2_enhancements.py ADDED
@@ -0,0 +1,1221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json, datetime
3
+ import numpy as np
4
+ import pandas as pd
5
+ import plotly.express as px
6
+ import plotly.graph_objects as go
7
+ import calendar
8
+
9
+ from db import get_db
10
+
11
+ db = get_db()
12
+
13
+
14
+ # Collections for Phase 2
15
+ mood_journal_col = db["mood_journal"]
16
+ goals_col = db["goals"]
17
+ exercises_col = db["exercises"]
18
+ achievements_col = db["achievements"]
19
+ reminders_col = db["reminders"]
20
+
21
+ # -------------------- 🗓️ MOOD JOURNAL --------------------
22
+ def mood_journal_page(username):
23
+ st.title("🗓️ Daily Mood Journal")
24
+ st.markdown("Track your emotions and identify patterns over time")
25
+
26
+ tab1, tab2, tab3 = st.tabs(["📝 New Entry", "📊 Mood History", "🔥 Heatmap"])
27
+
28
+ with tab1:
29
+ new_mood_entry(username)
30
+
31
+ with tab2:
32
+ mood_history(username)
33
+
34
+ with tab3:
35
+ mood_heatmap(username)
36
+
37
+ def new_mood_entry(username):
38
+ st.subheader("How are you feeling today?")
39
+
40
+ col1, col2 = st.columns([2, 1])
41
+
42
+ with col1:
43
+ # Mood selector with emojis
44
+ mood_options = {
45
+ "😊 Great": 5,
46
+ "🙂 Good": 4,
47
+ "😐 Okay": 3,
48
+ "😔 Down": 2,
49
+ "😢 Struggling": 1
50
+ }
51
+
52
+ selected_mood = st.radio(
53
+ "Select your mood:",
54
+ options=list(mood_options.keys()),
55
+ horizontal=True
56
+ )
57
+
58
+ # Detailed emotions
59
+ emotions = st.multiselect(
60
+ "What emotions are you experiencing?",
61
+ ["Joy", "Calm", "Energetic", "Anxious", "Sad", "Angry",
62
+ "Stressed", "Hopeful", "Lonely", "Content", "Frustrated", "Grateful"]
63
+ )
64
+
65
+ # Notes and triggers
66
+ notes = st.text_area(
67
+ "What's on your mind? (Optional)",
68
+ placeholder="Write about your day, thoughts, or anything you'd like to remember..."
69
+ )
70
+
71
+ triggers = st.text_input(
72
+ "Any triggers or important events?",
73
+ placeholder="E.g., work deadline, social event, exercise..."
74
+ )
75
+
76
+ with col2:
77
+ st.markdown("### 💡 Quick Tips")
78
+ st.info("""
79
+ **Benefits of Journaling:**
80
+ - Identify mood patterns
81
+ - Recognize triggers
82
+ - Track progress
83
+ - Process emotions
84
+ """)
85
+
86
+ col1, col2, col3 = st.columns([1, 1, 2])
87
+ with col1:
88
+ if st.button("💾 Save Entry", use_container_width=True):
89
+ entry = {
90
+ "username": username,
91
+ "mood": selected_mood,
92
+ "mood_score": mood_options[selected_mood],
93
+ "emotions": emotions,
94
+ "notes": notes,
95
+ "triggers": triggers,
96
+ "timestamp": datetime.datetime.utcnow(),
97
+ "date": datetime.datetime.utcnow().date().isoformat()
98
+ }
99
+
100
+ # Check if entry exists for today
101
+ existing = mood_journal_col.find_one({
102
+ "username": username,
103
+ "date": entry["date"]
104
+ })
105
+
106
+ if existing:
107
+ mood_journal_col.update_one(
108
+ {"_id": existing["_id"]},
109
+ {"$set": entry}
110
+ )
111
+ st.success("✅ Today's entry updated!")
112
+ else:
113
+ mood_journal_col.insert_one(entry)
114
+ st.success("✅ Entry saved successfully!")
115
+
116
+ # Check for streak achievement
117
+ check_journal_streak(username)
118
+
119
+ st.rerun()
120
+
121
+ def mood_history(username):
122
+ entries = list(mood_journal_col.find(
123
+ {"username": username}
124
+ ).sort("timestamp", -1).limit(30))
125
+
126
+ if not entries:
127
+ st.info("📝 No entries yet. Start journaling to see your history!")
128
+ return
129
+
130
+ df = pd.DataFrame(entries)
131
+ df['timestamp'] = pd.to_datetime(df['timestamp'])
132
+
133
+ # Mood trend chart
134
+ fig = go.Figure()
135
+ fig.add_trace(go.Scatter(
136
+ x=df['timestamp'],
137
+ y=df['mood_score'],
138
+ mode='lines+markers',
139
+ name='Mood Score',
140
+ line=dict(color='#FF6B6B', width=3),
141
+ marker=dict(size=8)
142
+ ))
143
+
144
+ fig.update_layout(
145
+ title='Your Mood Journey (Last 30 Days)',
146
+ xaxis_title='Date',
147
+ yaxis_title='Mood Score',
148
+ yaxis=dict(range=[0, 6], ticktext=['', 'Struggling', 'Down', 'Okay', 'Good', 'Great'],
149
+ tickvals=[0, 1, 2, 3, 4, 5]),
150
+ height=400
151
+ )
152
+
153
+ st.plotly_chart(fig, use_container_width=True)
154
+
155
+ # Statistics
156
+ col1, col2, col3, col4 = st.columns(4)
157
+
158
+ with col1:
159
+ avg_mood = df['mood_score'].mean()
160
+ st.metric("Average Mood", f"{avg_mood:.1f}/5")
161
+
162
+ with col2:
163
+ trend = "📈" if df['mood_score'].iloc[0] > df['mood_score'].iloc[-1] else "📉"
164
+ st.metric("Recent Trend", trend)
165
+
166
+ with col3:
167
+ best_day = df.loc[df['mood_score'].idxmax(), 'timestamp'].strftime('%b %d')
168
+ st.metric("Best Day", best_day)
169
+
170
+ with col4:
171
+ entries_count = len(entries)
172
+ st.metric("Total Entries", entries_count)
173
+
174
+ # Recent entries
175
+ st.markdown("---")
176
+ st.subheader("📖 Recent Entries")
177
+
178
+ for entry in entries[:10]:
179
+ with st.expander(f"{entry['mood']} - {entry['timestamp'].strftime('%b %d, %Y')}"):
180
+ if entry.get('emotions'):
181
+ st.markdown(f"**Emotions:** {', '.join(entry['emotions'])}")
182
+ if entry.get('notes'):
183
+ st.markdown(f"**Notes:** {entry['notes']}")
184
+ if entry.get('triggers'):
185
+ st.markdown(f"**Triggers:** {entry['triggers']}")
186
+
187
+ def mood_heatmap(username):
188
+ st.subheader("🔥 Mood Calendar Heatmap")
189
+
190
+ # Get last 90 days
191
+ end_date = datetime.datetime.utcnow()
192
+ start_date = end_date - datetime.timedelta(days=90)
193
+
194
+ entries = list(mood_journal_col.find({
195
+ "username": username,
196
+ "timestamp": {"$gte": start_date}
197
+ }))
198
+
199
+ if not entries:
200
+ st.info("📅 Start journaling to see your mood heatmap!")
201
+ return
202
+
203
+ # Create heatmap data
204
+ df = pd.DataFrame(entries)
205
+ df['date'] = pd.to_datetime(df['timestamp']).dt.date
206
+
207
+ # Generate calendar grid
208
+ today = datetime.date.today()
209
+ dates = pd.date_range(start=today - datetime.timedelta(days=90), end=today, freq='D')
210
+
211
+ heatmap_data = []
212
+ for date in dates:
213
+ date_str = date.date()
214
+ entry = df[df['date'] == date_str]
215
+ score = entry['mood_score'].values[0] if len(entry) > 0 else 0
216
+
217
+ heatmap_data.append({
218
+ 'date': date_str,
219
+ 'weekday': date.dayofweek,
220
+ 'week': date.isocalendar()[1],
221
+ 'score': score
222
+ })
223
+
224
+ heatmap_df = pd.DataFrame(heatmap_data)
225
+
226
+ # Create pivot table
227
+ pivot = heatmap_df.pivot(index='weekday', columns='week', values='score')
228
+
229
+ fig = go.Figure(data=go.Heatmap(
230
+ z=pivot.values,
231
+ x=pivot.columns,
232
+ y=['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
233
+ colorscale=[
234
+ [0, '#f0f0f0'],
235
+ [0.2, '#ffcccb'],
236
+ [0.4, '#ffb6c1'],
237
+ [0.6, '#90ee90'],
238
+ [0.8, '#98fb98'],
239
+ [1.0, '#00ff00']
240
+ ],
241
+ colorbar=dict(title="Mood")
242
+ ))
243
+
244
+ fig.update_layout(
245
+ title='90-Day Mood Heatmap',
246
+ xaxis_title='Week Number',
247
+ yaxis_title='Day of Week',
248
+ height=400
249
+ )
250
+
251
+ st.plotly_chart(fig, use_container_width=True)
252
+
253
+ # Insights
254
+ st.markdown("### 📊 Insights")
255
+ col1, col2 = st.columns(2)
256
+
257
+ with col1:
258
+ best_day = heatmap_df.groupby('weekday')['score'].mean().idxmax()
259
+ days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
260
+ st.info(f"🌟 Your best day is typically **{days[best_day]}**")
261
+
262
+ with col2:
263
+ consistency = (heatmap_df['score'] > 0).sum() / len(heatmap_df) * 100
264
+ st.info(f"📝 You've journaled **{consistency:.0f}%** of days")
265
+
266
+ # -------------------- 🎯 GOAL TRACKING --------------------
267
+ def goal_tracking_page(username):
268
+ st.title("🎯 Wellness Goals")
269
+ st.markdown("Set and track your personal wellness objectives")
270
+
271
+ tab1, tab2 = st.tabs(["🎯 My Goals", "➕ New Goal"])
272
+
273
+ with tab1:
274
+ display_goals(username)
275
+
276
+ with tab2:
277
+ create_goal(username)
278
+
279
+ def create_goal(username):
280
+ st.subheader("Create a New Goal")
281
+
282
+ col1, col2 = st.columns([2, 1])
283
+
284
+ with col1:
285
+ goal_types = {
286
+ "🏃 Exercise": "exercise",
287
+ "🧘 Meditation": "meditation",
288
+ "👥 Social": "social",
289
+ "😴 Sleep": "sleep",
290
+ "💧 Hydration": "hydration",
291
+ "📚 Learning": "learning",
292
+ "🎨 Creative": "creative"
293
+ }
294
+
295
+ goal_type = st.selectbox("Goal Type", list(goal_types.keys()))
296
+ goal_name = st.text_input("Goal Name", placeholder="E.g., Exercise 3 times a week")
297
+
298
+ col_a, col_b = st.columns(2)
299
+ with col_a:
300
+ target_value = st.number_input("Target Value", min_value=1, value=3)
301
+ with col_b:
302
+ frequency = st.selectbox("Frequency", ["Daily", "Weekly", "Monthly"])
303
+
304
+ notes = st.text_area("Notes (Optional)", placeholder="Why is this goal important to you?")
305
+
306
+ if st.button("🎯 Create Goal", use_container_width=True):
307
+ goal = {
308
+ "username": username,
309
+ "type": goal_types[goal_type],
310
+ "name": goal_name,
311
+ "target": target_value,
312
+ "frequency": frequency,
313
+ "current": 0,
314
+ "notes": notes,
315
+ "created_at": datetime.datetime.utcnow(),
316
+ "status": "active"
317
+ }
318
+
319
+ goals_col.insert_one(goal)
320
+ st.success("✅ Goal created successfully!")
321
+ st.rerun()
322
+
323
+ with col2:
324
+ st.markdown("### 💡 Goal Tips")
325
+ st.info("""
326
+ **SMART Goals:**
327
+ - Specific
328
+ - Measurable
329
+ - Achievable
330
+ - Relevant
331
+ - Time-bound
332
+ """)
333
+
334
+ def display_goals(username):
335
+ goals = list(goals_col.find({
336
+ "username": username,
337
+ "status": "active"
338
+ }))
339
+
340
+ if not goals:
341
+ st.info("🎯 No active goals. Create your first goal to get started!")
342
+ return
343
+
344
+ for goal in goals:
345
+ progress = min((goal['current'] / goal['target']) * 100, 100)
346
+
347
+ with st.container():
348
+ col1, col2, col3 = st.columns([3, 1, 1])
349
+
350
+ with col1:
351
+ st.markdown(f"### {goal['name']}")
352
+ st.progress(progress / 100)
353
+ st.caption(f"{goal['current']}/{goal['target']} • {goal['frequency']}")
354
+
355
+ with col2:
356
+ if st.button("➕", key=f"inc_{goal['_id']}", help="Increment"):
357
+ goals_col.update_one(
358
+ {"_id": goal["_id"]},
359
+ {"$inc": {"current": 1}}
360
+ )
361
+
362
+ # Check if goal completed
363
+ if goal['current'] + 1 >= goal['target']:
364
+ unlock_achievement(username, "goal_completed")
365
+
366
+ st.rerun()
367
+
368
+ with col3:
369
+ if st.button("✅", key=f"complete_{goal['_id']}", help="Mark Complete"):
370
+ goals_col.update_one(
371
+ {"_id": goal["_id"]},
372
+ {"$set": {"status": "completed", "completed_at": datetime.datetime.utcnow()}}
373
+ )
374
+ unlock_achievement(username, "goal_master")
375
+ st.rerun()
376
+
377
+ st.markdown("---")
378
+
379
+ # -------------------- 📚 GUIDED EXERCISES --------------------
380
+ def guided_exercises_page(username):
381
+ st.title("📚 Guided Wellness Exercises")
382
+
383
+ tab1, tab2, tab3, tab4 = st.tabs([
384
+ "🌬️ Breathing", "💭 Thought Record", "🙏 Gratitude", "📝 CBT Worksheet"
385
+ ])
386
+
387
+ with tab1:
388
+ breathing_exercise(username)
389
+
390
+ with tab2:
391
+ thought_record(username)
392
+
393
+ with tab3:
394
+ gratitude_journal(username)
395
+
396
+ with tab4:
397
+ cbt_worksheet(username)
398
+
399
+ def breathing_exercise(username):
400
+ st.subheader("🌬️ Breathing Exercises")
401
+
402
+ exercise_type = st.selectbox(
403
+ "Choose an exercise:",
404
+ ["4-7-8 Breathing", "Box Breathing", "Calm Breathing"]
405
+ )
406
+
407
+ col1, col2 = st.columns([2, 1])
408
+
409
+ with col1:
410
+ if exercise_type == "4-7-8 Breathing":
411
+ st.markdown("""
412
+ ### 4-7-8 Breathing Technique
413
+
414
+ This technique helps reduce anxiety and promote relaxation.
415
+
416
+ **Steps:**
417
+ 1. **Inhale** through your nose for **4 seconds**
418
+ 2. **Hold** your breath for **7 seconds**
419
+ 3. **Exhale** through your mouth for **8 seconds**
420
+ 4. Repeat 4 times
421
+ """)
422
+
423
+ elif exercise_type == "Box Breathing":
424
+ st.markdown("""
425
+ ### Box Breathing
426
+
427
+ Used by Navy SEALs to stay calm under pressure.
428
+
429
+ **Steps:**
430
+ 1. **Inhale** for **4 seconds**
431
+ 2. **Hold** for **4 seconds**
432
+ 3. **Exhale** for **4 seconds**
433
+ 4. **Hold** for **4 seconds**
434
+ 5. Repeat 4 times
435
+ """)
436
+
437
+ else:
438
+ st.markdown("""
439
+ ### Calm Breathing
440
+
441
+ Simple relaxation breathing.
442
+
443
+ **Steps:**
444
+ 1. **Inhale** slowly through nose for **3 seconds**
445
+ 2. **Exhale** slowly through mouth for **6 seconds**
446
+ 3. Repeat 5 times
447
+ """)
448
+
449
+ if st.button("▶️ Start Exercise", use_container_width=True):
450
+ # Log exercise completion
451
+ exercises_col.insert_one({
452
+ "username": username,
453
+ "type": "breathing",
454
+ "exercise": exercise_type,
455
+ "timestamp": datetime.datetime.utcnow()
456
+ })
457
+
458
+ st.success("✅ Exercise completed! Great job taking care of yourself.")
459
+ unlock_achievement(username, "breath_master")
460
+
461
+ with col2:
462
+ st.markdown("### 💡 Benefits")
463
+ st.info("""
464
+ - Reduces stress
465
+ - Lowers heart rate
466
+ - Improves focus
467
+ - Reduces anxiety
468
+ - Better sleep
469
+ """)
470
+
471
+ def thought_record(username):
472
+ st.subheader("💭 Thought Record Worksheet")
473
+ st.markdown("Identify and challenge negative thoughts using CBT techniques")
474
+
475
+ situation = st.text_area(
476
+ "1. What was the situation?",
477
+ placeholder="Describe what happened..."
478
+ )
479
+
480
+ emotions = st.text_input(
481
+ "2. What emotions did you feel?",
482
+ placeholder="E.g., Anxious, sad, angry..."
483
+ )
484
+
485
+ automatic_thought = st.text_area(
486
+ "3. What automatic thoughts came up?",
487
+ placeholder="What went through your mind?"
488
+ )
489
+
490
+ evidence_for = st.text_area(
491
+ "4. Evidence supporting the thought:",
492
+ placeholder="What makes you think this thought is true?"
493
+ )
494
+
495
+ evidence_against = st.text_area(
496
+ "5. Evidence against the thought:",
497
+ placeholder="What suggests this thought might not be completely true?"
498
+ )
499
+
500
+ balanced_thought = st.text_area(
501
+ "6. A more balanced thought:",
502
+ placeholder="What's a more realistic way to think about this?"
503
+ )
504
+
505
+ col1, col2 = st.columns([1, 3])
506
+ with col1:
507
+ if st.button("💾 Save Record", use_container_width=True):
508
+ record = {
509
+ "username": username,
510
+ "type": "thought_record",
511
+ "situation": situation,
512
+ "emotions": emotions,
513
+ "automatic_thought": automatic_thought,
514
+ "evidence_for": evidence_for,
515
+ "evidence_against": evidence_against,
516
+ "balanced_thought": balanced_thought,
517
+ "timestamp": datetime.datetime.utcnow()
518
+ }
519
+
520
+ exercises_col.insert_one(record)
521
+ st.success("✅ Thought record saved!")
522
+ unlock_achievement(username, "thought_challenger")
523
+
524
+ def gratitude_journal(username):
525
+ st.subheader("🙏 Daily Gratitude Journal")
526
+ st.markdown("Research shows gratitude improves mental well-being")
527
+
528
+ st.markdown("### What are you grateful for today?")
529
+
530
+ gratitude1 = st.text_input("1.", placeholder="Something you're thankful for...")
531
+ gratitude2 = st.text_input("2.", placeholder="Another thing you appreciate...")
532
+ gratitude3 = st.text_input("3.", placeholder="One more thing...")
533
+
534
+ reflection = st.text_area(
535
+ "Optional: Reflect on why these matter to you",
536
+ placeholder="Take a moment to reflect..."
537
+ )
538
+
539
+ col1, col2 = st.columns([1, 3])
540
+ with col1:
541
+ if st.button("💾 Save Entry", use_container_width=True):
542
+ entry = {
543
+ "username": username,
544
+ "type": "gratitude",
545
+ "items": [gratitude1, gratitude2, gratitude3],
546
+ "reflection": reflection,
547
+ "timestamp": datetime.datetime.utcnow()
548
+ }
549
+
550
+ exercises_col.insert_one(entry)
551
+ st.success("✅ Gratitude entry saved!")
552
+ unlock_achievement(username, "gratitude_warrior")
553
+
554
+ # Show recent entries
555
+ st.markdown("---")
556
+ st.markdown("### 📖 Recent Entries")
557
+
558
+ recent = list(exercises_col.find({
559
+ "username": username,
560
+ "type": "gratitude"
561
+ }).sort("timestamp", -1).limit(5))
562
+
563
+ for entry in recent:
564
+ with st.expander(entry['timestamp'].strftime('%b %d, %Y')):
565
+ for i, item in enumerate(entry['items'], 1):
566
+ if item:
567
+ st.markdown(f"{i}. {item}")
568
+
569
+ def cbt_worksheet(username):
570
+ st.subheader("📝 CBT Worksheet")
571
+ st.markdown("Work through cognitive distortions with this structured approach")
572
+
573
+ distortion_types = [
574
+ "All-or-Nothing Thinking",
575
+ "Overgeneralization",
576
+ "Mental Filter",
577
+ "Discounting Positives",
578
+ "Jumping to Conclusions",
579
+ "Magnification/Minimization",
580
+ "Emotional Reasoning",
581
+ "Should Statements",
582
+ "Labeling",
583
+ "Personalization"
584
+ ]
585
+
586
+ distortion = st.selectbox("Type of cognitive distortion:", distortion_types)
587
+
588
+ trigger = st.text_area("What triggered this thought?")
589
+ thought = st.text_area("The distorted thought:")
590
+ challenge = st.text_area("Challenge: What's the evidence against this?")
591
+ reframe = st.text_area("Reframed thought:")
592
+
593
+ col1, col2 = st.columns([1, 3])
594
+ with col1:
595
+ if st.button("💾 Save Worksheet", use_container_width=True):
596
+ worksheet = {
597
+ "username": username,
598
+ "type": "cbt_worksheet",
599
+ "distortion": distortion,
600
+ "trigger": trigger,
601
+ "thought": thought,
602
+ "challenge": challenge,
603
+ "reframe": reframe,
604
+ "timestamp": datetime.datetime.utcnow()
605
+ }
606
+
607
+ exercises_col.insert_one(worksheet)
608
+ st.success("✅ CBT worksheet saved!")
609
+
610
+ # -------------------- 🏆 GAMIFICATION --------------------
611
+ def gamification_page(username):
612
+ st.title("🏆 Achievements & Progress")
613
+ st.markdown("Track your wellness journey milestones")
614
+
615
+ tab1, tab2 = st.tabs(["🏅 Achievements", "📊 Statistics"])
616
+
617
+ with tab1:
618
+ display_achievements(username)
619
+
620
+ with tab2:
621
+ display_statistics(username)
622
+
623
+ def display_achievements(username):
624
+ # Define all achievements
625
+ all_achievements = {
626
+ "first_chat": {
627
+ "name": "First Steps",
628
+ "description": "Started your first conversation",
629
+ "icon": "👋",
630
+ "points": 10
631
+ },
632
+ "journal_streak_7": {
633
+ "name": "Week Warrior",
634
+ "description": "Journaled for 7 days straight",
635
+ "icon": "🔥",
636
+ "points": 50
637
+ },
638
+ "goal_completed": {
639
+ "name": "Goal Getter",
640
+ "description": "Completed your first goal",
641
+ "icon": "🎯",
642
+ "points": 30
643
+ },
644
+ "breath_master": {
645
+ "name": "Breath Master",
646
+ "description": "Completed 10 breathing exercises",
647
+ "icon": "🌬️",
648
+ "points": 40
649
+ },
650
+ "thought_challenger": {
651
+ "name": "Thought Challenger",
652
+ "description": "Completed 5 thought records",
653
+ "icon": "💭",
654
+ "points": 50
655
+ },
656
+ "gratitude_warrior": {
657
+ "name": "Gratitude Warrior",
658
+ "description": "Logged gratitude 10 times",
659
+ "icon": "🙏",
660
+ "points": 40
661
+ },
662
+ "goal_master": {
663
+ "name": "Goal Master",
664
+ "description": "Completed 5 wellness goals",
665
+ "icon": "🏆",
666
+ "points": 100
667
+ }
668
+ }
669
+
670
+ # Get user's achievements
671
+ user_achievements = list(achievements_col.find({"username": username}))
672
+ unlocked_ids = [a['achievement_id'] for a in user_achievements]
673
+
674
+ # Calculate total points
675
+ total_points = sum([all_achievements[a['achievement_id']]['points']
676
+ for a in user_achievements if a['achievement_id'] in all_achievements])
677
+
678
+ # Display stats
679
+ col1, col2, col3 = st.columns(3)
680
+
681
+ with col1:
682
+ st.metric("🏅 Achievements", f"{len(user_achievements)}/{len(all_achievements)}")
683
+
684
+ with col2:
685
+ st.metric("⭐ Total Points", total_points)
686
+
687
+ with col3:
688
+ level = total_points // 100 + 1
689
+ st.metric("📊 Level", level)
690
+
691
+ st.markdown("---")
692
+
693
+ # Display achievements grid
694
+ cols = st.columns(3)
695
+
696
+ for idx, (achievement_id, achievement) in enumerate(all_achievements.items()):
697
+ with cols[idx % 3]:
698
+ is_unlocked = achievement_id in unlocked_ids
699
+
700
+ if is_unlocked:
701
+ st.markdown(f"""
702
+ <div style='padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
703
+ border-radius: 10px; text-align: center; color: white;'>
704
+ <div style='font-size: 3rem;'>{achievement['icon']}</div>
705
+ <div style='font-weight: bold; margin: 10px 0;'>{achievement['name']}</div>
706
+ <div style='font-size: 0.9rem; opacity: 0.9;'>{achievement['description']}</div>
707
+ <div style='margin-top: 10px; font-weight: bold;'>+{achievement['points']} pts</div>
708
+ </div>
709
+ """, unsafe_allow_html=True)
710
+ else:
711
+ st.markdown(f"""
712
+ <div style='padding: 20px; background: #f0f0f0; border-radius: 10px;
713
+ text-align: center; opacity: 0.5;'>
714
+ <div style='font-size: 3rem;'>🔒</div>
715
+ <div style='font-weight: bold; margin: 10px 0;'>{achievement['name']}</div>
716
+ <div style='font-size: 0.9rem;'>{achievement['description']}</div>
717
+ <div style='margin-top: 10px;'>+{achievement['points']} pts</div>
718
+ </div>
719
+ """, unsafe_allow_html=True)
720
+
721
+ st.markdown("<br>", unsafe_allow_html=True)
722
+
723
+ def display_statistics(username):
724
+ # Gather all user data
725
+ total_chats = db["sessions"].count_documents({"username": username})
726
+ total_journal = mood_journal_col.count_documents({"username": username})
727
+ total_goals = goals_col.count_documents({"username": username})
728
+ completed_goals = goals_col.count_documents({"username": username, "status": "completed"})
729
+ total_exercises = exercises_col.count_documents({"username": username})
730
+
731
+ # Display comprehensive stats
732
+ st.subheader("📊 Your Wellness Statistics")
733
+
734
+ col1, col2, col3, col4 = st.columns(4)
735
+
736
+ with col1:
737
+ st.metric("💬 Total Chats", total_chats)
738
+ st.metric("📝 Journal Entries", total_journal)
739
+
740
+ with col2:
741
+ st.metric("🎯 Goals Created", total_goals)
742
+ st.metric("✅ Goals Completed", completed_goals)
743
+
744
+ with col3:
745
+ st.metric("📚 Exercises Done", total_exercises)
746
+
747
+ with col4:
748
+ # Calculate streak
749
+ streak = calculate_login_streak(username)
750
+ st.metric("🔥 Login Streak", f"{streak} days")
751
+
752
+ # Activity timeline
753
+ st.markdown("---")
754
+ st.subheader("📈 Activity Timeline")
755
+
756
+ # Combine all activities
757
+ activities = []
758
+
759
+ # Chats
760
+ for chat in db["sessions"].find({"username": username}).limit(100):
761
+ activities.append({
762
+ "date": chat["timestamp"],
763
+ "type": "Chat",
764
+ "description": "Had a conversation"
765
+ })
766
+
767
+ # Journal
768
+ for entry in mood_journal_col.find({"username": username}).limit(100):
769
+ activities.append({
770
+ "date": entry["timestamp"],
771
+ "type": "Journal",
772
+ "description": f"Mood: {entry['mood']}"
773
+ })
774
+
775
+ # Goals
776
+ for goal in goals_col.find({"username": username}).limit(100):
777
+ activities.append({
778
+ "date": goal["created_at"],
779
+ "type": "Goal",
780
+ "description": f"Created goal: {goal['name']}"
781
+ })
782
+
783
+ # Exercises
784
+ for exercise in exercises_col.find({"username": username}).limit(100):
785
+ activities.append({
786
+ "date": exercise["timestamp"],
787
+ "type": "Exercise",
788
+ "description": f"Completed {exercise['type']}"
789
+ })
790
+
791
+ # Sort by date
792
+ activities.sort(key=lambda x: x["date"], reverse=True)
793
+
794
+ # Display timeline
795
+ for activity in activities[:20]:
796
+ st.markdown(f"**{activity['date'].strftime('%b %d, %I:%M %p')}** - {activity['type']}: {activity['description']}")
797
+
798
+ def unlock_achievement(username, achievement_id):
799
+ """Unlock an achievement for a user"""
800
+ existing = achievements_col.find_one({
801
+ "username": username,
802
+ "achievement_id": achievement_id
803
+ })
804
+
805
+ if not existing:
806
+ achievements_col.insert_one({
807
+ "username": username,
808
+ "achievement_id": achievement_id,
809
+ "unlocked_at": datetime.datetime.utcnow()
810
+ })
811
+
812
+ def check_journal_streak(username):
813
+ """Check and award streak achievements"""
814
+ entries = list(mood_journal_col.find(
815
+ {"username": username}
816
+ ).sort("timestamp", -1).limit(30))
817
+
818
+ if len(entries) >= 7:
819
+ dates = [e['timestamp'].date() for e in entries]
820
+ dates.sort(reverse=True)
821
+
822
+ streak = 1
823
+ for i in range(len(dates) - 1):
824
+ if (dates[i] - dates[i + 1]).days == 1:
825
+ streak += 1
826
+ else:
827
+ break
828
+
829
+ if streak >= 7:
830
+ unlock_achievement(username, "journal_streak_7")
831
+
832
+ def calculate_login_streak(username):
833
+ """Calculate consecutive login days"""
834
+ sessions = list(db["sessions"].find(
835
+ {"username": username}
836
+ ).sort("timestamp", -1))
837
+
838
+ if not sessions:
839
+ return 0
840
+
841
+ dates = sorted(set([s['timestamp'].date() for s in sessions]), reverse=True)
842
+
843
+ streak = 1
844
+ for i in range(len(dates) - 1):
845
+ if (dates[i] - dates[i + 1]).days == 1:
846
+ streak += 1
847
+ else:
848
+ break
849
+
850
+ return streak
851
+
852
+ # -------------------- 🔔 REMINDERS (Browser Notifications) --------------------
853
+ # ==================== ENHANCED REMINDERS PAGE ====================
854
+ # Replace the reminders_page() function in your phase2_enhancements.py with this
855
+
856
+ def reminders_page(username):
857
+ st.title("🔔 Smart Reminders")
858
+ st.markdown("Set up gentle reminders for your wellness activities")
859
+
860
+ # Instructions
861
+ st.info("""
862
+ 💡 **How it works:**
863
+ - Reminders appear in the sidebar when you're using the app
864
+ - You can dismiss or snooze each reminder
865
+ - Reminders reset daily for a fresh start
866
+ """)
867
+
868
+ # ==================== TEST SECTION ====================
869
+ st.markdown("---")
870
+ st.subheader("🧪 Test Your Reminders")
871
+ st.caption("Click to see what a reminder looks like")
872
+
873
+ col1, col2, col3 = st.columns(3)
874
+
875
+ with col1:
876
+ if st.button("🔔 Test Check-in", use_container_width=True):
877
+ st.sidebar.warning("**🔔 Mood Check-in Reminder**")
878
+ st.sidebar.caption("Time to log your mood! Head to Mood Journal.")
879
+ st.sidebar.markdown("---")
880
+ st.success("✅ Check the sidebar to see the test reminder!")
881
+
882
+ with col2:
883
+ if st.button("🌬️ Test Breathing", use_container_width=True):
884
+ st.sidebar.info("**🌬️ Breathing Exercise Reminder**")
885
+ st.sidebar.caption("Take 2 minutes for a breathing break! Visit the Exercises tab.")
886
+ st.sidebar.markdown("---")
887
+ st.success("✅ Check the sidebar to see the test reminder!")
888
+
889
+ with col3:
890
+ if st.button("🎯 Test Goals", use_container_width=True):
891
+ st.sidebar.success("**🎯 Goal Progress Check**")
892
+ st.sidebar.caption("Review your wellness goals today! Check the Goals tab.")
893
+ st.sidebar.markdown("---")
894
+ st.success("✅ Check the sidebar to see the test reminder!")
895
+
896
+ # ==================== DAILY CHECK-IN ====================
897
+ st.markdown("---")
898
+ st.subheader("📅 Daily Mood Check-in Reminder")
899
+ st.markdown("Get reminded to log your mood every day")
900
+
901
+ # Get existing settings
902
+ existing_checkin = reminders_col.find_one({"username": username, "type": "checkin"})
903
+
904
+ col1, col2 = st.columns([2, 1])
905
+
906
+ with col1:
907
+ checkin_enabled = st.checkbox(
908
+ "Enable daily mood check-in reminder",
909
+ value=existing_checkin.get('enabled', False) if existing_checkin else False,
910
+ key="checkin_reminder"
911
+ )
912
+
913
+ default_time = datetime.time(20, 0)
914
+ if existing_checkin and 'time' in existing_checkin:
915
+ try:
916
+ h, m = map(int, existing_checkin['time'].split(':'))
917
+ default_time = datetime.time(h, m)
918
+ except:
919
+ pass
920
+
921
+ checkin_time = st.time_input("Reminder time", default_time)
922
+ st.caption("🕐 Best time: Evening, before bed (e.g., 8:00 PM)")
923
+
924
+ with col2:
925
+ st.markdown("<br>", unsafe_allow_html=True)
926
+ if st.button("💾 Save Check-in Settings", key="save_checkin", use_container_width=True):
927
+ reminders_col.update_one(
928
+ {"username": username, "type": "checkin"},
929
+ {"$set": {
930
+ "enabled": checkin_enabled,
931
+ "time": checkin_time.strftime("%H:%M"),
932
+ "updated_at": datetime.datetime.utcnow()
933
+ }},
934
+ upsert=True
935
+ )
936
+ st.success("✅ Check-in reminder saved!")
937
+ st.balloons()
938
+
939
+ # Show status
940
+ if checkin_enabled:
941
+ st.success(f"✅ Active: You'll be reminded at {checkin_time.strftime('%I:%M %p')} daily")
942
+ else:
943
+ st.info("ℹ️ Currently disabled")
944
+
945
+ # ==================== BREATHING EXERCISE ====================
946
+ st.markdown("---")
947
+ st.subheader("🌬️ Breathing Exercise Reminders")
948
+ st.markdown("Regular breathing breaks reduce stress and anxiety")
949
+
950
+ # Get existing settings
951
+ existing_breathing = reminders_col.find_one({"username": username, "type": "breathing"})
952
+
953
+ col1, col2 = st.columns([2, 1])
954
+
955
+ with col1:
956
+ breathing_enabled = st.checkbox(
957
+ "Enable breathing exercise reminders",
958
+ value=existing_breathing.get('enabled', False) if existing_breathing else False,
959
+ key="breathing_reminder"
960
+ )
961
+
962
+ default_freq = existing_breathing.get('frequency', 'Every 4 hours') if existing_breathing else 'Every 4 hours'
963
+ breathing_frequency = st.selectbox(
964
+ "How often?",
965
+ ["Every 2 hours", "Every 4 hours", "Twice daily"],
966
+ index=["Every 2 hours", "Every 4 hours", "Twice daily"].index(default_freq)
967
+ )
968
+
969
+ st.caption("💡 Recommendation: Every 4 hours for balanced practice")
970
+
971
+ with col2:
972
+ st.markdown("<br>", unsafe_allow_html=True)
973
+ if st.button("💾 Save Breathing Settings", key="save_breathing", use_container_width=True):
974
+ reminders_col.update_one(
975
+ {"username": username, "type": "breathing"},
976
+ {"$set": {
977
+ "enabled": breathing_enabled,
978
+ "frequency": breathing_frequency,
979
+ "updated_at": datetime.datetime.utcnow()
980
+ }},
981
+ upsert=True
982
+ )
983
+ st.success("✅ Breathing reminder saved!")
984
+ st.balloons()
985
+
986
+ # Show status
987
+ if breathing_enabled:
988
+ if breathing_frequency == "Every 2 hours":
989
+ st.success("✅ Active: Reminders every 2 hours (12 PM, 2 PM, 4 PM, 6 PM, 8 PM)")
990
+ elif breathing_frequency == "Every 4 hours":
991
+ st.success("✅ Active: Reminders every 4 hours (12 PM, 4 PM, 8 PM)")
992
+ else:
993
+ st.success("✅ Active: Reminders twice daily (9 AM, 6 PM)")
994
+ else:
995
+ st.info("ℹ️ Currently disabled")
996
+
997
+ # ==================== GOAL PROGRESS ====================
998
+ st.markdown("---")
999
+ st.subheader("🎯 Goal Progress Check-ins")
1000
+ st.markdown("Stay on track with regular goal reviews")
1001
+
1002
+ # Get existing settings
1003
+ existing_goal = reminders_col.find_one({"username": username, "type": "goal"})
1004
+
1005
+ col1, col2 = st.columns([2, 1])
1006
+
1007
+ with col1:
1008
+ goal_enabled = st.checkbox(
1009
+ "Enable goal progress reminders",
1010
+ value=existing_goal.get('enabled', False) if existing_goal else False,
1011
+ key="goal_reminder"
1012
+ )
1013
+
1014
+ default_goal_freq = existing_goal.get('frequency', 'Daily') if existing_goal else 'Daily'
1015
+ goal_frequency = st.selectbox(
1016
+ "Check-in frequency",
1017
+ ["Daily", "Every 3 days", "Weekly"],
1018
+ index=["Daily", "Every 3 days", "Weekly"].index(default_goal_freq)
1019
+ )
1020
+
1021
+ st.caption("📊 Recommendation: Daily for best results")
1022
+
1023
+ with col2:
1024
+ st.markdown("<br>", unsafe_allow_html=True)
1025
+ if st.button("💾 Save Goal Settings", key="save_goal", use_container_width=True):
1026
+ reminders_col.update_one(
1027
+ {"username": username, "type": "goal"},
1028
+ {"$set": {
1029
+ "enabled": goal_enabled,
1030
+ "frequency": goal_frequency,
1031
+ "updated_at": datetime.datetime.utcnow()
1032
+ }},
1033
+ upsert=True
1034
+ )
1035
+ st.success("✅ Goal reminder saved!")
1036
+ st.balloons()
1037
+
1038
+ # Show status
1039
+ if goal_enabled:
1040
+ if goal_frequency == "Daily":
1041
+ st.success("✅ Active: Reminder every morning at 9 AM")
1042
+ elif goal_frequency == "Every 3 days":
1043
+ st.success("✅ Active: Reminder every 3 days at 9 AM")
1044
+ else:
1045
+ st.success("✅ Active: Reminder every Monday at 9 AM")
1046
+ else:
1047
+ st.info("ℹ️ Currently disabled")
1048
+
1049
+ # ==================== SUMMARY ====================
1050
+ st.markdown("---")
1051
+ st.subheader("📊 Your Reminder Summary")
1052
+
1053
+ all_reminders = list(reminders_col.find({"username": username}))
1054
+
1055
+ if not all_reminders:
1056
+ st.info("🔕 No reminders set yet. Configure them above!")
1057
+ else:
1058
+ active_count = sum(1 for r in all_reminders if r.get('enabled', False))
1059
+
1060
+ col1, col2, col3 = st.columns(3)
1061
+
1062
+ with col1:
1063
+ st.metric("Total Reminders", len(all_reminders))
1064
+ with col2:
1065
+ st.metric("Active", active_count)
1066
+ with col3:
1067
+ st.metric("Inactive", len(all_reminders) - active_count)
1068
+
1069
+ # List all reminders
1070
+ st.markdown("### 📋 All Reminders")
1071
+
1072
+ for reminder in all_reminders:
1073
+ reminder_type = reminder.get('type', 'unknown')
1074
+ is_enabled = reminder.get('enabled', False)
1075
+
1076
+ icon_map = {
1077
+ 'checkin': '📅',
1078
+ 'breathing': '🌬️',
1079
+ 'goal': '🎯'
1080
+ }
1081
+
1082
+ name_map = {
1083
+ 'checkin': 'Daily Mood Check-in',
1084
+ 'breathing': 'Breathing Exercise',
1085
+ 'goal': 'Goal Progress'
1086
+ }
1087
+
1088
+ icon = icon_map.get(reminder_type, '🔔')
1089
+ name = name_map.get(reminder_type, 'Reminder')
1090
+ status = "✅ Active" if is_enabled else "🔕 Inactive"
1091
+
1092
+ with st.expander(f"{icon} {name} - {status}"):
1093
+ if reminder_type == 'checkin':
1094
+ st.write(f"**Time:** {reminder.get('time', 'Not set')}")
1095
+ elif reminder_type == 'breathing':
1096
+ st.write(f"**Frequency:** {reminder.get('frequency', 'Not set')}")
1097
+ elif reminder_type == 'goal':
1098
+ st.write(f"**Frequency:** {reminder.get('frequency', 'Not set')}")
1099
+
1100
+ if 'updated_at' in reminder:
1101
+ st.caption(f"Last updated: {reminder['updated_at'].strftime('%b %d, %Y %I:%M %p')}")
1102
+
1103
+ # ==================== TIPS ====================
1104
+ st.markdown("---")
1105
+ st.subheader("💡 Reminder Tips")
1106
+
1107
+ st.markdown("""
1108
+ **Getting the most from reminders:**
1109
+
1110
+ 1. 🕐 **Set realistic times** - Choose times when you're usually free
1111
+ 2. 📱 **Keep the app open** - Reminders show when you're using the app
1112
+ 3. ✅ **Act on reminders** - Take action when you see them
1113
+ 4. 🔄 **Adjust as needed** - Change frequencies if they're too much/little
1114
+ 5. 🎯 **Start small** - Begin with 1-2 reminders, add more later
1115
+
1116
+ **Best practices:**
1117
+ - Morning reminders work best for goal reviews
1118
+ - Evening reminders are ideal for mood journaling
1119
+ - Breathing reminders help during work hours
1120
+ """)
1121
+
1122
+ # ==================== QUICK ACTIONS ====================
1123
+ st.markdown("---")
1124
+ st.subheader("⚡ Quick Actions")
1125
+
1126
+ col1, col2, col3 = st.columns(3)
1127
+
1128
+ with col1:
1129
+ if st.button("🔕 Disable All", use_container_width=True):
1130
+ reminders_col.update_many(
1131
+ {"username": username},
1132
+ {"$set": {"enabled": False}}
1133
+ )
1134
+ st.success("All reminders disabled")
1135
+ st.rerun()
1136
+
1137
+ with col2:
1138
+ if st.button("✅ Enable All", use_container_width=True):
1139
+ reminders_col.update_many(
1140
+ {"username": username},
1141
+ {"$set": {"enabled": True}}
1142
+ )
1143
+ st.success("All reminders enabled")
1144
+ st.rerun()
1145
+
1146
+ with col3:
1147
+ if st.button("🗑️ Delete All", use_container_width=True):
1148
+ count = reminders_col.delete_many({"username": username}).deleted_count
1149
+ st.success(f"Deleted {count} reminders")
1150
+ st.rerun()
1151
+
1152
+ # -------------------- MAIN PHASE 2 ROUTER --------------------
1153
+ def phase2_main(username, page):
1154
+ """
1155
+ Main router for Phase 2 features
1156
+
1157
+ Args:
1158
+ username: Current logged-in user
1159
+ page: Which page to display
1160
+ """
1161
+
1162
+ if page == "🗓️ Mood Journal":
1163
+ mood_journal_page(username)
1164
+
1165
+ elif page == "🎯 Goals":
1166
+ goal_tracking_page(username)
1167
+
1168
+ elif page == "📚 Exercises":
1169
+ guided_exercises_page(username)
1170
+
1171
+ elif page == "🏆 Achievements":
1172
+ gamification_page(username)
1173
+
1174
+ elif page == "🔔 Reminders":
1175
+ reminders_page(username)
1176
+
1177
+ # -------------------- INTEGRATION EXAMPLE --------------------
1178
+ """
1179
+ HOW TO INTEGRATE WITH YOUR MAIN APP:
1180
+
1181
+ 1. Import this module in your main app:
1182
+
1183
+ import phase2_enhancements as phase2
1184
+
1185
+ 2. Add Phase 2 options to your sidebar navigation:
1186
+
1187
+ page = st.radio("📍 Navigate", [
1188
+ "💬 Chat",
1189
+ "virtual_chat",
1190
+ "📊 Analytics",
1191
+ "ℹ️ Resources",
1192
+ "🗓️ Mood Journal", # NEW
1193
+ "🎯 Goals", # NEW
1194
+ "📚 Exercises", # NEW
1195
+ "🏆 Achievements", # NEW
1196
+ "🔔 Reminders" # NEW
1197
+ ])
1198
+
1199
+ 3. Route to Phase 2 features:
1200
+
1201
+ if page in ["🗓️ Mood Journal", "🎯 Goals", "📚 Exercises",
1202
+ "🏆 Achievements", "🔔 Reminders"]:
1203
+ phase2.phase2_main(st.session_state.username, page)
1204
+ elif page == "💬 Chat":
1205
+ chat_interface()
1206
+ # ... rest of your pages
1207
+
1208
+ 4. That's it! All Phase 2 features are now integrated.
1209
+
1210
+ FEATURES INCLUDED:
1211
+ ✅ Mood Journal with calendar heatmap
1212
+ ✅ Goal tracking with progress bars
1213
+ ✅ Guided breathing exercises
1214
+ ✅ CBT thought records
1215
+ ✅ Gratitude journaling
1216
+ ✅ Gamification with achievements
1217
+ ✅ Smart reminders
1218
+ ✅ Comprehensive analytics
1219
+
1220
+ All data is stored in your existing MongoDB database!
1221
+ """
phase3_intervention.py ADDED
@@ -0,0 +1,1774 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json, datetime
3
+ import pandas as pd
4
+ import numpy as np
5
+ import base64
6
+ from io import BytesIO
7
+ from PIL import Image, ImageDraw, ImageFont
8
+ import random
9
+ import plotly.express as px
10
+ import plotly.graph_objects as go
11
+
12
+ from db import get_db
13
+
14
+ # -------------------- Database Connection --------------------
15
+ db = get_db()
16
+
17
+
18
+ # Collections for Phase 3
19
+ coping_plans_col = db["coping_plans"]
20
+ resources_col = db["resources"]
21
+ mood_board_col = db["mood_boards"]
22
+ gratitude_jar_col = db["gratitude_jar"]
23
+ worry_box_col = db["worry_box"]
24
+ sessions_col = db["sessions"] # For assessment data
25
+
26
+ # -------------------- 🎯 PERSONALIZED COPING PLANS --------------------
27
+ def coping_plans_page(username):
28
+ st.title("🎯 Your Personalized Coping Plan")
29
+ st.markdown("Custom strategies based on your mental health profile")
30
+
31
+ tab1, tab2, tab3 = st.tabs(["📋 My Plan", "🔄 Generate New Plan", "📚 All Plans"])
32
+
33
+ with tab1:
34
+ display_current_plan(username)
35
+
36
+ with tab2:
37
+ generate_coping_plan(username)
38
+
39
+ with tab3:
40
+ view_all_plans(username)
41
+
42
+ def generate_coping_plan(username):
43
+ st.subheader("🔄 Generate Personalized Coping Plan")
44
+
45
+ # Get user's recent assessment data
46
+ recent_sessions = list(sessions_col.find(
47
+ {"username": username}
48
+ ).sort("timestamp", -1).limit(10))
49
+
50
+ if not recent_sessions:
51
+ st.info("💡 Chat with the bot first to generate a personalized plan based on your emotions!")
52
+ return
53
+
54
+ # Analyze user's patterns
55
+ emotions = [s.get('emotion', 'neutral') for s in recent_sessions]
56
+ most_common_emotion = max(set(emotions), key=emotions.count)
57
+
58
+ st.markdown(f"### Based on your recent patterns:")
59
+ st.info(f"**Most Common Emotion:** {most_common_emotion.title()}")
60
+
61
+ # Select focus areas
62
+ st.markdown("### Select your focus areas:")
63
+
64
+ focus_areas = st.multiselect(
65
+ "What would you like to work on?",
66
+ ["Anxiety Management", "Stress Relief", "Mood Enhancement",
67
+ "Sleep Quality", "Social Connection", "Self-Esteem",
68
+ "Anger Management", "Grief Processing"],
69
+ default=["Anxiety Management", "Stress Relief"]
70
+ )
71
+
72
+ intensity = st.select_slider(
73
+ "How intense should the interventions be?",
74
+ options=["Gentle", "Moderate", "Intensive"],
75
+ value="Moderate"
76
+ )
77
+
78
+ if st.button("🎯 Generate My Coping Plan", use_container_width=True):
79
+ plan = create_personalized_plan(username, most_common_emotion, focus_areas, intensity)
80
+
81
+ coping_plans_col.insert_one({
82
+ "username": username,
83
+ "emotion_pattern": most_common_emotion,
84
+ "focus_areas": focus_areas,
85
+ "intensity": intensity,
86
+ "plan": plan,
87
+ "created_at": datetime.datetime.utcnow(),
88
+ "active": True
89
+ })
90
+
91
+ st.success("✅ Your personalized coping plan has been generated!")
92
+ st.rerun()
93
+
94
+ def create_personalized_plan(username, emotion, focus_areas, intensity):
95
+ """Generate a personalized coping plan based on user data"""
96
+
97
+ # Breathing exercises based on emotion
98
+ breathing_exercises = {
99
+ "anxiety": {
100
+ "name": "4-7-8 Calming Breath",
101
+ "steps": [
102
+ "Inhale through nose for 4 seconds",
103
+ "Hold breath for 7 seconds",
104
+ "Exhale through mouth for 8 seconds",
105
+ "Repeat 4 times"
106
+ ],
107
+ "benefit": "Activates parasympathetic nervous system, reduces anxiety"
108
+ },
109
+ "anger": {
110
+ "name": "Box Breathing",
111
+ "steps": [
112
+ "Inhale for 4 seconds",
113
+ "Hold for 4 seconds",
114
+ "Exhale for 4 seconds",
115
+ "Hold for 4 seconds",
116
+ "Repeat 5 times"
117
+ ],
118
+ "benefit": "Regulates emotions and reduces anger intensity"
119
+ },
120
+ "sadness": {
121
+ "name": "Energizing Breath",
122
+ "steps": [
123
+ "Quick inhale through nose (1 second)",
124
+ "Quick exhale through nose (1 second)",
125
+ "Repeat rapidly 10 times",
126
+ "Rest and breathe normally"
127
+ ],
128
+ "benefit": "Increases energy and lifts mood"
129
+ },
130
+ "default": {
131
+ "name": "Calm Breathing",
132
+ "steps": [
133
+ "Inhale slowly for 3 seconds",
134
+ "Exhale slowly for 6 seconds",
135
+ "Repeat 5 times"
136
+ ],
137
+ "benefit": "General relaxation and stress reduction"
138
+ }
139
+ }
140
+
141
+ # Activity suggestions based on focus areas
142
+ activities = {
143
+ "Anxiety Management": [
144
+ "🚶 Take a 10-minute mindful walk",
145
+ "📝 Write down 3 things you can control right now",
146
+ "🎧 Listen to calming music for 15 minutes",
147
+ "🧘 Progressive muscle relaxation (5 minutes)"
148
+ ],
149
+ "Stress Relief": [
150
+ "🛁 Take a warm bath or shower",
151
+ "📚 Read for pleasure (20 minutes)",
152
+ "🎨 Engage in creative activity",
153
+ "☕ Practice mindful tea/coffee drinking"
154
+ ],
155
+ "Mood Enhancement": [
156
+ "🌞 Get 15 minutes of sunlight",
157
+ "🤝 Connect with a friend or family member",
158
+ "🎵 Listen to uplifting music and dance",
159
+ "😊 Watch a comedy show or funny videos"
160
+ ],
161
+ "Sleep Quality": [
162
+ "📱 No screens 1 hour before bed",
163
+ "📖 Read a physical book before sleep",
164
+ "🌙 Keep bedroom cool and dark",
165
+ "🧘 Do gentle stretching before bed"
166
+ ],
167
+ "Social Connection": [
168
+ "📞 Call or text a friend you haven't spoken to recently",
169
+ "👥 Join an online community of your interest",
170
+ "🤝 Plan a social activity for this week",
171
+ "💬 Share something positive with someone today"
172
+ ],
173
+ "Self-Esteem": [
174
+ "🪞 Write 5 things you like about yourself",
175
+ "🏆 Acknowledge one achievement from today",
176
+ "💪 Do something you're good at",
177
+ "🎯 Set and complete one small goal today"
178
+ ],
179
+ "Anger Management": [
180
+ "🚶 Take a break and walk away from the situation",
181
+ "✍️ Write an angry letter (don't send it)",
182
+ "🥊 Physical exercise to release tension",
183
+ "🧊 Hold ice cubes to ground yourself"
184
+ ],
185
+ "Grief Processing": [
186
+ "📝 Journal about your memories",
187
+ "🕯️ Create a small memorial or ritual",
188
+ "🤗 Allow yourself to cry if needed",
189
+ "💬 Talk to someone who understands your loss"
190
+ ]
191
+ }
192
+
193
+ # Get appropriate breathing exercise
194
+ breath_exercise = breathing_exercises.get(emotion.lower(), breathing_exercises["default"])
195
+
196
+ # Select activities based on focus areas
197
+ selected_activities = []
198
+ for area in focus_areas:
199
+ if area in activities:
200
+ selected_activities.extend(activities[area][:2]) # Take top 2 from each area
201
+
202
+ # Daily schedule based on intensity
203
+ schedules = {
204
+ "Gentle": {
205
+ "morning": "5 minutes breathing exercise",
206
+ "afternoon": "One coping activity from your list",
207
+ "evening": "Gratitude reflection (3 things)"
208
+ },
209
+ "Moderate": {
210
+ "morning": "10 minutes breathing + mood check-in",
211
+ "afternoon": "Two coping activities",
212
+ "evening": "Breathing exercise + gratitude journal"
213
+ },
214
+ "Intensive": {
215
+ "morning": "15 minutes breathing + meditation",
216
+ "midday": "Mood check-in + one activity",
217
+ "afternoon": "Two coping activities",
218
+ "evening": "Breathing + gratitude + worry box review"
219
+ }
220
+ }
221
+
222
+ plan = {
223
+ "breathing_exercise": breath_exercise,
224
+ "activities": selected_activities,
225
+ "daily_schedule": schedules[intensity],
226
+ "emergency_contacts": [
227
+ {"name": "AASRA", "number": "91-22-27546669"},
228
+ {"name": "Vandrevala Foundation", "number": "1860-2662-345"}
229
+ ],
230
+ "grounding_technique": {
231
+ "name": "5-4-3-2-1 Grounding",
232
+ "steps": [
233
+ "5 things you can see",
234
+ "4 things you can touch",
235
+ "3 things you can hear",
236
+ "2 things you can smell",
237
+ "1 thing you can taste"
238
+ ]
239
+ }
240
+ }
241
+
242
+ return plan
243
+
244
+ def display_current_plan(username):
245
+ """Display the user's active coping plan"""
246
+
247
+ plan_doc = coping_plans_col.find_one({
248
+ "username": username,
249
+ "active": True
250
+ }, sort=[("created_at", -1)])
251
+
252
+ if not plan_doc:
253
+ st.info("📋 No active coping plan. Generate one in the 'Generate New Plan' tab!")
254
+ return
255
+
256
+ plan = plan_doc['plan']
257
+
258
+ # Display plan header
259
+ st.markdown(f"### Your Active Plan")
260
+ st.caption(f"Created: {plan_doc['created_at'].strftime('%B %d, %Y')}")
261
+ st.markdown(f"**Focus Areas:** {', '.join(plan_doc['focus_areas'])}")
262
+ st.markdown(f"**Intensity:** {plan_doc['intensity']}")
263
+
264
+ st.markdown("---")
265
+
266
+ # Breathing Exercise Section
267
+ with st.expander("🌬️ Your Breathing Exercise", expanded=True):
268
+ breath = plan['breathing_exercise']
269
+ st.markdown(f"### {breath['name']}")
270
+ st.info(f"**Benefit:** {breath['benefit']}")
271
+
272
+ st.markdown("**Steps:**")
273
+ for i, step in enumerate(breath['steps'], 1):
274
+ st.markdown(f"{i}. {step}")
275
+
276
+ if st.button("✅ I completed this exercise", key="breath_complete"):
277
+ st.success("Great job! Keep up the good work! 🌟")
278
+
279
+ # Daily Schedule
280
+ with st.expander("📅 Daily Schedule", expanded=True):
281
+ schedule = plan['daily_schedule']
282
+
283
+ col1, col2, col3 = st.columns(3)
284
+
285
+ with col1:
286
+ st.markdown("#### 🌅 Morning")
287
+ st.info(schedule.get('morning', 'N/A'))
288
+
289
+ with col2:
290
+ st.markdown("#### ☀️ Afternoon")
291
+ st.info(schedule.get('afternoon', schedule.get('midday', 'N/A')))
292
+
293
+ with col3:
294
+ st.markdown("#### 🌙 Evening")
295
+ st.info(schedule.get('evening', 'N/A'))
296
+
297
+ # Activities
298
+ with st.expander("🎯 Recommended Activities", expanded=True):
299
+ st.markdown("Choose activities that resonate with you:")
300
+
301
+ activities = plan.get('activities', [])
302
+ for activity in activities:
303
+ col1, col2 = st.columns([4, 1])
304
+ with col1:
305
+ st.markdown(f"• {activity}")
306
+ with col2:
307
+ if st.button("✓", key=f"activity_{hash(activity)}"):
308
+ st.success("Done! ✨")
309
+
310
+ # Grounding Technique
311
+ with st.expander("🧘 Emergency Grounding Technique"):
312
+ grounding = plan['grounding_technique']
313
+ st.markdown(f"### {grounding['name']}")
314
+ st.markdown("Use this when feeling overwhelmed:")
315
+
316
+ for step in grounding['steps']:
317
+ st.markdown(f"• {step}")
318
+
319
+ # Emergency Contacts
320
+ with st.expander("🆘 Emergency Contacts"):
321
+ st.markdown("### Crisis Helplines")
322
+ for contact in plan['emergency_contacts']:
323
+ st.markdown(f"**{contact['name']}:** {contact['number']}")
324
+
325
+ def view_all_plans(username):
326
+ """View all historical coping plans"""
327
+
328
+ plans = list(coping_plans_col.find(
329
+ {"username": username}
330
+ ).sort("created_at", -1))
331
+
332
+ if not plans:
333
+ st.info("📚 No plans yet. Generate your first one!")
334
+ return
335
+
336
+ st.subheader("📚 Your Coping Plans History")
337
+
338
+ for plan_doc in plans:
339
+ with st.expander(
340
+ f"Plan from {plan_doc['created_at'].strftime('%B %d, %Y')} - "
341
+ f"{plan_doc['intensity']} Intensity"
342
+ ):
343
+ st.markdown(f"**Focus Areas:** {', '.join(plan_doc['focus_areas'])}")
344
+ st.markdown(f"**Based on emotion pattern:** {plan_doc['emotion_pattern'].title()}")
345
+
346
+ if st.button("🔄 Activate This Plan", key=f"activate_{plan_doc['_id']}"):
347
+ # Deactivate all plans
348
+ coping_plans_col.update_many(
349
+ {"username": username},
350
+ {"$set": {"active": False}}
351
+ )
352
+ # Activate selected plan
353
+ coping_plans_col.update_one(
354
+ {"_id": plan_doc["_id"]},
355
+ {"$set": {"active": True}}
356
+ )
357
+ st.success("✅ Plan activated!")
358
+ st.rerun()
359
+
360
+ # -------------------- 📚 RESOURCE LIBRARY --------------------
361
+ def resource_library_page(username):
362
+ st.title("📚 Resource Library")
363
+ st.markdown("Access guided sessions, tutorials, and worksheets")
364
+
365
+ tab1, tab2, tab3, tab4 = st.tabs(["🎥 Videos", "🎧 Audio", "📄 Worksheets", "📖 Articles"])
366
+
367
+ with tab1:
368
+ video_resources(username)
369
+
370
+ with tab2:
371
+ audio_resources(username)
372
+
373
+ with tab3:
374
+ worksheet_resources(username)
375
+
376
+ with tab4:
377
+ article_resources(username)
378
+
379
+ def video_resources(username):
380
+ st.subheader("🎥 Video Tutorials")
381
+
382
+ videos = [
383
+ {
384
+ "title": "5-Minute Breathing Exercise",
385
+ "duration": "5:00",
386
+ "category": "Breathing",
387
+ "description": "Quick breathing technique to calm anxiety",
388
+ "url": "https://www.youtube.com/watch?v=tybOi4hjZFQ"
389
+ },
390
+ {
391
+ "title": "Guided Meditation for Beginners",
392
+ "duration": "10:00",
393
+ "category": "Meditation",
394
+ "description": "Perfect for those new to meditation",
395
+ "url": "https://www.youtube.com/watch?v=inpok4MKVLM"
396
+ },
397
+ {
398
+ "title": "Progressive Muscle Relaxation",
399
+ "duration": "15:00",
400
+ "category": "Relaxation",
401
+ "description": "Release physical tension systematically",
402
+ "url": "https://www.youtube.com/watch?v=ihO02wUzgkc"
403
+ },
404
+ {
405
+ "title": "Mindful Walking Tutorial",
406
+ "duration": "8:00",
407
+ "category": "Mindfulness",
408
+ "description": "Turn your walk into a meditation",
409
+ "url": "https://www.youtube.com/watch?v=6p_yaNFSYao"
410
+ },
411
+ {
412
+ "title": "Body Scan Meditation",
413
+ "duration": "20:00",
414
+ "category": "Meditation",
415
+ "description": "Deep relaxation through body awareness",
416
+ "url": "https://www.youtube.com/watch?v=ihO02wUzgkc"
417
+ }
418
+ ]
419
+
420
+ for video in videos:
421
+ with st.container():
422
+ col1, col2 = st.columns([3, 1])
423
+
424
+ with col1:
425
+ st.markdown(f"### {video['title']}")
426
+ st.caption(f"⏱️ {video['duration']} • 🏷️ {video['category']}")
427
+ st.markdown(video['description'])
428
+
429
+ with col2:
430
+ if st.button("▶️ Watch", key=f"video_{video['title']}"):
431
+ st.markdown(f"[Open Video]({video['url']})")
432
+
433
+ # Log resource access
434
+ resources_col.insert_one({
435
+ "username": username,
436
+ "type": "video",
437
+ "title": video['title'],
438
+ "timestamp": datetime.datetime.utcnow()
439
+ })
440
+
441
+ st.markdown("---")
442
+
443
+ def audio_resources(username):
444
+ st.subheader("🎧 Audio Guided Sessions")
445
+
446
+ audio_sessions = [
447
+ {
448
+ "title": "Sleep Meditation",
449
+ "duration": "30:00",
450
+ "category": "Sleep",
451
+ "description": "Gentle guidance to help you fall asleep",
452
+ "url": "https://www.youtube.com/watch?v=aEqlQvczMJQ",
453
+ "embed_id": "aEqlQvczMJQ"
454
+ },
455
+ {
456
+ "title": "Anxiety Relief Session",
457
+ "duration": "15:00",
458
+ "category": "Anxiety",
459
+ "description": "Calm your anxious thoughts",
460
+ "url": "https://www.youtube.com/watch?v=O-6f5wQXSu8",
461
+ "embed_id": "O-6f5wQXSu8"
462
+ },
463
+ {
464
+ "title": "Morning Motivation",
465
+ "duration": "10:00",
466
+ "category": "Motivation",
467
+ "description": "Start your day with positivity",
468
+ "url": "https://www.youtube.com/watch?v=ZsTKyYOuK84",
469
+ "embed_id": "ZsTKyYOuK84"
470
+ },
471
+ {
472
+ "title": "Stress Release",
473
+ "duration": "20:00",
474
+ "category": "Stress",
475
+ "description": "Let go of daily stress and tension",
476
+ "url": "https://www.youtube.com/watch?v=inpok4MKVLM",
477
+ "embed_id": "inpok4MKVLM"
478
+ },
479
+ {
480
+ "title": "Self-Compassion Practice",
481
+ "duration": "12:00",
482
+ "category": "Self-Care",
483
+ "description": "Cultivate kindness toward yourself",
484
+ "url": "https://www.youtube.com/watch?v=11U0h0DPu7k",
485
+ "embed_id": "11U0h0DPu7k"
486
+ }
487
+ ]
488
+
489
+ for audio in audio_sessions:
490
+ with st.expander(f"🎧 {audio['title']} ({audio['duration']})"):
491
+ st.caption(f"🏷️ {audio['category']}")
492
+ st.markdown(audio['description'])
493
+
494
+ # Embed YouTube video
495
+ st.markdown(
496
+ f"""
497
+ <iframe width="100%" height="200"
498
+ src="https://www.youtube.com/embed/{audio['embed_id']}"
499
+ frameborder="0"
500
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
501
+ allowfullscreen>
502
+ </iframe>
503
+ """,
504
+ unsafe_allow_html=True
505
+ )
506
+
507
+ # Log when user opens the expander
508
+ if st.button("✅ Mark as Listened", key=f"audio_{audio['title']}"):
509
+ resources_col.insert_one({
510
+ "username": username,
511
+ "type": "audio",
512
+ "title": audio['title'],
513
+ "timestamp": datetime.datetime.utcnow()
514
+ })
515
+ st.success("🎉 Great job! Session logged.")
516
+
517
+ st.markdown("---")
518
+
519
+ def worksheet_resources(username):
520
+ st.subheader("📄 CBT Worksheets – Guided Exercises ✨")
521
+
522
+ worksheets = [
523
+ {
524
+ "title": "Thought Record",
525
+ "category": "CBT",
526
+ "description": "Identify negative thoughts and replace them with balanced ones.",
527
+ "content": """
528
+ ### 📝 How to use the Thought Record Worksheet
529
+ 1. **Notice a Negative Thought** 💭
530
+ - Recall a recent thought that caused stress, worry, or discomfort.
531
+ - Write it down in clear words.
532
+
533
+ 2. **Identify the Cognitive Distortion** 🔍
534
+ - Ask yourself: Is this thought all-or-nothing? Overgeneralized? Catastrophizing?
535
+ - Labeling the distortion helps you see it clearly.
536
+
537
+ 3. **Examine the Evidence** 📊
538
+ - Look for facts that support this thought.
539
+ - Look for facts that contradict it.
540
+ - Balance your perspective by considering both sides.
541
+
542
+ 4. **Create a Balanced Thought** 🌈
543
+ - Reframe the situation realistically and kindly.
544
+ - Example: “I struggled in the meeting, but I also shared some good ideas. I am learning and improving.”
545
+
546
+ 5. **Reflect on the Outcome** 🌟
547
+ - How do you feel after reframing the thought?
548
+ - Notice changes in mood, tension, or perspective.
549
+
550
+ 💡 Tip: Practice this daily for 5–10 minutes. Over time, your mind naturally starts noticing distortions and reframing automatically. ✨
551
+ """
552
+ },
553
+ {
554
+ "title": "Behavioral Activation",
555
+ "category": "Depression",
556
+ "description": "Plan small positive activities to improve mood.",
557
+ "content": """
558
+ ### 📝 How to use the Behavioral Activation Worksheet
559
+ 1. **List Activities You Enjoy or Value** 🎨🏃‍♂️
560
+ - Write down small activities that bring you joy or purpose, even if it’s simple (e.g., walking, listening to music, calling a friend).
561
+
562
+ 2. **Schedule Your Activities** 📅
563
+ - Pick 1–3 activities per day.
564
+ - Write down the time and place so it becomes a concrete plan.
565
+
566
+ 3. **Notice Your Mood Before and After** 🌞
567
+ - Rate your mood from 1–10 before the activity.
568
+ - Rate your mood after completing it.
569
+ - Observe how small positive steps influence your overall mood.
570
+
571
+ 4. **Start Small** 🐾
572
+ - Begin with achievable tasks.
573
+ - Small wins create momentum and motivation.
574
+
575
+ 5. **Reflect and Adjust** 🔄
576
+ - Celebrate completed activities.
577
+ - Adjust your plan based on what worked and what didn’t.
578
+
579
+ 💡 Tip: Even on low-energy days, doing one small activity can shift your perspective and create a positive ripple effect. 🎉
580
+ """
581
+ },
582
+ {
583
+ "title": "Anxiety Trigger Log",
584
+ "category": "Anxiety",
585
+ "description": "Track what triggers anxiety and how you respond.",
586
+ "content": """
587
+ ### 📝 How to use the Anxiety Trigger Log
588
+ 1. **Identify Triggers** ⚠️
589
+ - Note situations, people, thoughts, or environments that provoke anxiety.
590
+ - Be specific about the context.
591
+
592
+ 2. **Describe Your Response** 🧠💓
593
+ - Record your emotional, physical, and behavioral reactions.
594
+ - Examples: racing heart, shallow breathing, avoidance, rumination.
595
+
596
+ 3. **Rate Anxiety Level** 📊
597
+ - Use a scale of 1–10 to indicate how strong the anxiety felt.
598
+ - Helps monitor patterns over time.
599
+
600
+ 4. **Identify Coping Strategies** 🌿
601
+ - Note what helped calm you or what could help next time.
602
+ - Examples: deep breathing, mindfulness, grounding techniques, calling a friend.
603
+
604
+ 5. **Reflect and Learn** 📝
605
+ - Review patterns weekly.
606
+ - Notice repeated triggers, effective coping strategies, and progress.
607
+
608
+ 💡 Tip: Logging triggers does not make anxiety worse; it gives you insight and control. Knowledge is power! 💪
609
+ """
610
+ },
611
+ {
612
+ "title": "Gratitude Worksheet",
613
+ "category": "Positive",
614
+ "description": "Write down things you are grateful for to shift perspective.",
615
+ "content": """
616
+ ### 📝 How to use the Gratitude Worksheet
617
+ 1. **List Three Things Daily** 🌸
618
+ - Write down at least three things you are grateful for today.
619
+ - Examples: sunny morning, supportive friend, completed task.
620
+
621
+ 2. **Be Specific** ✨
622
+ - Avoid generalities like “I’m grateful for life.”
623
+ - Detail makes the gratitude practice more powerful.
624
+
625
+ 3. **Notice the Why** 💖
626
+ - Reflect why you are grateful for each item.
627
+ - Example: “I’m grateful for my friend calling me because it made me feel supported and connected.”
628
+
629
+ 4. **Include People and Moments** 👨‍👩‍👧‍👦
630
+ - Recognize others’ impact on your life.
631
+ - Small gestures often bring the most meaning.
632
+
633
+ 5. **Reflect on the Impact** 🌟
634
+ - After a week, review your entries.
635
+ - Notice changes in mood, perspective, and stress levels.
636
+
637
+ 💡 Tip: Gratitude rewires your brain to notice positive experiences. It’s a simple yet powerful tool for lasting happiness! 😄
638
+ """
639
+ },
640
+ {
641
+ "title": "Sleep Hygiene Checklist",
642
+ "category": "Sleep",
643
+ "description": "Improve your sleep routine using evidence-based habits.",
644
+ "content": """
645
+ ### 📝 How to use the Sleep Hygiene Checklist
646
+ 1. **Set a Consistent Schedule** ⏰
647
+ - Go to bed and wake up at the same time every day.
648
+ - Your body thrives on routine.
649
+
650
+ 2. **Create a Sleep-Friendly Environment** 🌙
651
+ - Keep your bedroom dark, quiet, and cool.
652
+ - Use blackout curtains or eye masks.
653
+ - Remove electronic distractions.
654
+
655
+ 3. **Wind Down Before Bed** 🛀
656
+ - Avoid screens 60 minutes before sleep.
657
+ - Practice gentle stretching, deep breathing, or light reading.
658
+
659
+ 4. **Limit Stimulants** ☕
660
+ - Avoid caffeine, nicotine, and heavy meals close to bedtime.
661
+
662
+ 5. **Track Sleep Patterns** 📊
663
+ - Note bedtime, wake time, and sleep quality.
664
+ - Identify habits that help or hinder rest.
665
+
666
+ 6. **Practice Relaxation Techniques** 🌿
667
+ - Meditation, progressive muscle relaxation, or guided audio can calm your mind.
668
+
669
+ 7. **Daytime Habits Matter** 🌞
670
+ - Regular physical activity improves sleep.
671
+ - Exposure to sunlight helps regulate your circadian rhythm.
672
+
673
+ 💡 Tip: Good sleep is foundational for mental, emotional, and physical health. Prioritize it, and your mind and body will thank you! 😴✨
674
+ """
675
+ }
676
+ ]
677
+
678
+ for ws in worksheets:
679
+ with st.expander(f"📄 {ws['title']}"):
680
+ st.caption(f"🏷️ {ws['category']}")
681
+ st.markdown(ws['description'])
682
+ st.markdown(ws.get('content', '📌 No detailed guide yet.'))
683
+
684
+ if st.button("📝 Mark as Completed", key=f"ws_{ws['title']}"):
685
+ resources_col.insert_one({
686
+ "username": username,
687
+ "type": "worksheet",
688
+ "title": ws['title'],
689
+ "timestamp": datetime.datetime.utcnow()
690
+ })
691
+ st.success("🎉 Worksheet completed and logged!")
692
+
693
+
694
+
695
+ def article_resources(username):
696
+ st.subheader("📖 Helpful Articles")
697
+
698
+ articles = [
699
+ {
700
+ "title": "Understanding Anxiety: A Complete Guide",
701
+ "read_time": "10 min",
702
+ "category": "Education",
703
+ "summary": "Learn about anxiety disorders, symptoms, and evidence-based treatments.",
704
+ "content": """Anxiety is not a weakness. It is not a flaw in your character. It is not a sign that you are broken.
705
+ Anxiety is a signal — a deeply human response from your nervous system trying to protect you.
706
+
707
+ Long ago, anxiety kept humans alive. It prepared the body to react to danger, to run, to fight, or to freeze.
708
+ But in the modern world, where threats are psychological, social, and emotional, that same system can become overactive.
709
+
710
+ When anxiety becomes constant, it stops being protection and starts becoming a burden.
711
+
712
+ You may feel it as:
713
+ A racing mind that never seems to rest.
714
+ A tightness in your chest that makes breathing feel shallow.
715
+ A constant sense that something is wrong, even when nothing is.
716
+ A fear of the future that loops endlessly in your thoughts.
717
+
718
+ This can be exhausting.
719
+ It can be isolating.
720
+ It can make you feel like you are fighting an invisible battle every single day.
721
+
722
+ But here is the truth:
723
+ You are not alone.
724
+ You are not weak.
725
+ And you are not beyond help.
726
+
727
+ Anxiety is one of the most common mental health experiences in the world.
728
+ Millions of people live with it, learn to manage it, and go on to live meaningful, peaceful lives.
729
+
730
+ Understanding anxiety is the first step toward reducing its power over you.
731
+
732
+ Anxiety is driven by your nervous system — especially a part called the amygdala.
733
+ The amygdala scans your environment for danger.
734
+ When it senses a threat, it sends a signal that releases stress hormones like adrenaline and cortisol.
735
+
736
+ Your heart beats faster.
737
+ Your breathing becomes shallow.
738
+ Your muscles tense.
739
+ Your thoughts become focused on survival.
740
+
741
+ This is known as the “fight or flight” response.
742
+
743
+ In short bursts, this system is helpful.
744
+ But when it is activated too often or for too long, it creates chronic anxiety.
745
+
746
+ Your body begins to live as if danger is always present.
747
+ Your mind becomes hyper-alert.
748
+ Your emotions become harder to regulate.
749
+
750
+ This is why anxiety is not just “in your head.”
751
+ It is in your body.
752
+ It is in your nervous system.
753
+ It is in your biology.
754
+
755
+ And because it is biological, it is treatable.
756
+
757
+ There are many forms of anxiety:
758
+ Generalized Anxiety Disorder — constant worry about many areas of life.
759
+ Social Anxiety — fear of judgment, embarrassment, or rejection.
760
+ Panic Disorder — sudden waves of intense fear and physical symptoms.
761
+ Health Anxiety — constant worry about illness or bodily sensations.
762
+ Phobias — intense fear of specific situations or objects.
763
+
764
+ Each type feels different.
765
+ But all of them share one core feature:
766
+ Your brain is trying to protect you from perceived danger.
767
+
768
+ The problem is not that your brain is broken.
769
+ The problem is that your brain is trying too hard.
770
+
771
+ Anxiety often grows when we avoid what we fear.
772
+ Avoidance gives short-term relief, but it teaches the brain that the threat was real.
773
+ So the fear grows stronger.
774
+
775
+ This is why anxiety can slowly shrink your world.
776
+ You stop doing things you once enjoyed.
777
+ You cancel plans.
778
+ You avoid people, places, or situations.
779
+
780
+ Your life becomes smaller, not because you want it to — but because anxiety is steering your choices.
781
+
782
+ The good news is that this pattern can be reversed.
783
+
784
+ Your brain is plastic — it changes with experience.
785
+ Every time you face a fear gently and safely, your brain learns:
786
+ “I survived this.”
787
+ “I can handle this.”
788
+ “This is not as dangerous as I thought.”
789
+
790
+ This is how healing happens.
791
+
792
+ There are powerful, evidence-based tools that help reduce anxiety:
793
+
794
+ Cognitive Behavioral Therapy helps you identify anxious thought patterns and replace them with more balanced ones.
795
+ Mindfulness teaches you to observe your thoughts instead of being trapped inside them.
796
+ Breathing exercises calm the nervous system and signal safety to the body.
797
+ Physical movement helps burn off excess stress hormones.
798
+ Healthy sleep restores emotional regulation.
799
+ Connection with others reminds your brain that you are safe and supported.
800
+
801
+ Sometimes medication is helpful — not as a failure, but as a support while you heal.
802
+
803
+ And perhaps the most important part of healing anxiety is changing how you relate to it.
804
+
805
+ Instead of fighting anxiety, you learn to understand it.
806
+ Instead of fearing fear, you learn to tolerate it.
807
+ Instead of judging yourself, you learn to show compassion.
808
+
809
+ You learn to say:
810
+ “This is uncomfortable, but I am safe.”
811
+ “This feeling will rise, and this feeling will fall.”
812
+ “I do not have to control everything to be okay.”
813
+
814
+ With time, patience, and practice, anxiety loses its grip.
815
+ It does not vanish overnight.
816
+ But it softens.
817
+ It quiets.
818
+ It becomes manageable.
819
+
820
+ And you become stronger — not because anxiety disappears, but because you learn you can live well even when it appears.
821
+
822
+ Your life is bigger than your fear.
823
+ Your future is not defined by your anxiety.
824
+ Your nervous system can learn peace again.
825
+
826
+ And step by step, breath by breath, moment by moment —
827
+ You are moving toward that peace.
828
+
829
+ You are not broken.
830
+ You are human.
831
+ And you are healing.
832
+ """
833
+
834
+ },
835
+ {
836
+ "title": "10 Science-Backed Ways to Reduce Stress",
837
+ "read_time": "7 min",
838
+ "category": "Tips",
839
+ "summary": "Practical, research-supported strategies for stress management.",
840
+ "content": """Stress is not a sign that you are failing.
841
+ Stress is a sign that you are human.
842
+
843
+ Your body was designed to respond to challenge with energy, focus, and alertness.
844
+ But when stress becomes constant, your nervous system never gets the message that it is safe to rest.
845
+
846
+ Your mind becomes tired.
847
+ Your body becomes tense.
848
+ Your emotions become harder to regulate.
849
+ Your joy becomes quieter.
850
+
851
+ Stress slowly drains you — not because you are weak, but because your system was never meant to run at full speed all the time.
852
+
853
+ The good news is this:
854
+ Your body also has a built-in system for calm.
855
+ You can activate it intentionally.
856
+
857
+ Here are 10 science-backed ways to reduce stress and restore balance.
858
+
859
+ 1. Slow, deep breathing.
860
+ When you slow your breath, you directly signal safety to your nervous system.
861
+ Long exhalations activate the parasympathetic nervous system — the part responsible for rest and recovery.
862
+ Even five slow breaths can reduce cortisol and heart rate.
863
+
864
+ 2. Move your body gently and regularly.
865
+ Exercise is one of the most effective stress regulators.
866
+ It releases endorphins, improves sleep, and burns off excess adrenaline.
867
+ This does not mean intense workouts only — walking, stretching, yoga, or dancing all count.
868
+
869
+ 3. Spend time in nature.
870
+ Research shows that being in green spaces lowers stress hormones, reduces rumination, and improves mood.
871
+ Even looking at trees through a window has a calming effect on the brain.
872
+
873
+ 4. Practice mindfulness.
874
+ Mindfulness trains your brain to stay in the present moment instead of looping through worries about the future.
875
+ It reduces activity in the brain’s fear center and strengthens emotional regulation.
876
+
877
+ 5. Improve sleep quality.
878
+ Sleep is when your nervous system resets.
879
+ Poor sleep increases emotional reactivity and stress sensitivity.
880
+ Creating a consistent sleep routine can dramatically improve stress levels.
881
+
882
+ 6. Limit caffeine and stimulants.
883
+ Caffeine activates the same system involved in anxiety and stress.
884
+ Reducing intake can significantly lower baseline tension in the body.
885
+
886
+ 7. Connect with others.
887
+ Human connection is a powerful stress buffer.
888
+ Feeling seen, heard, and supported reduces cortisol and increases oxytocin — the hormone of safety and bonding.
889
+
890
+ 8. Write your thoughts down.
891
+ Journaling reduces mental load by moving thoughts from your mind onto paper.
892
+ This creates clarity and reduces rumination.
893
+
894
+ 9. Practice self-compassion.
895
+ Harsh self-criticism keeps the stress response activated.
896
+ Speaking to yourself with kindness tells your brain that you are safe, even when things are imperfect.
897
+
898
+ 10. Accept what you cannot control.
899
+ Stress often comes from trying to control what is uncertain.
900
+ Letting go is not giving up — it is choosing peace over constant struggle.
901
+
902
+ Stress does not mean something is wrong with you.
903
+ It means your system is asking for care.
904
+
905
+ You are not meant to be calm all the time.
906
+ But you are meant to feel safe in your own body.
907
+
908
+ By practicing these tools gently and consistently, you teach your nervous system that the world is not always an emergency.
909
+ You give your mind permission to rest.
910
+ You give your body permission to soften.
911
+
912
+ And from that softness, clarity grows.
913
+ Energy returns.
914
+ Joy becomes easier to access.
915
+
916
+ Stress is not your enemy.
917
+ It is a message.
918
+
919
+ And you are learning how to listen — and how to respond with care.
920
+ """
921
+
922
+ },
923
+ {
924
+ "title": "The Power of Mindfulness",
925
+ "read_time": "8 min",
926
+ "category": "Mindfulness",
927
+ "summary": "How mindfulness can transform your mental health.",
928
+ "content": """Mindfulness is not about stopping your thoughts.
929
+ It is not about becoming calm all the time.
930
+ It is not about emptying your mind or being “perfectly present.”
931
+
932
+ Mindfulness is about learning how to be with your experience — exactly as it is — without judgment.
933
+
934
+ It is the practice of noticing what is happening inside you and around you with kindness and curiosity.
935
+
936
+ Your thoughts.
937
+ Your emotions.
938
+ Your bodily sensations.
939
+ Your breath.
940
+ Your environment.
941
+
942
+ Without pushing them away.
943
+ Without clinging to them.
944
+ Without criticizing yourself for having them.
945
+
946
+ And this simple shift changes everything.
947
+
948
+ Because most suffering does not come from pain itself.
949
+ It comes from our resistance to pain.
950
+ Our fear of it.
951
+ Our stories about it.
952
+ Our desire to escape it.
953
+
954
+ Mindfulness gently teaches you:
955
+ “You do not need to fight your experience to be okay.”
956
+
957
+ From a scientific perspective, mindfulness reshapes the brain.
958
+
959
+ Studies show that regular mindfulness practice:
960
+ Reduces activity in the amygdala (the brain’s fear center).
961
+ Strengthens the prefrontal cortex (responsible for emotional regulation).
962
+ Improves attention and focus.
963
+ Reduces rumination and worry.
964
+ Increases emotional resilience.
965
+
966
+ In simple words:
967
+ It helps your brain become calmer, clearer, and kinder.
968
+
969
+ But beyond science, mindfulness changes how life feels.
970
+
971
+ It turns automatic reactions into conscious responses.
972
+ It creates space between a feeling and an action.
973
+ It gives you the freedom to choose how you show up.
974
+
975
+ Instead of being pulled by every thought, you learn to observe them.
976
+ Instead of being overwhelmed by every emotion, you learn to hold them.
977
+ Instead of being lost in the past or anxious about the future, you return to now.
978
+
979
+ And in this moment — this breath, this body, this awareness — you find stability.
980
+
981
+ Mindfulness begins with the breath.
982
+ Not because breathing is magical, but because it is always here.
983
+
984
+ You may not always feel calm.
985
+ You may not always feel happy.
986
+ But you can always feel your breath.
987
+
988
+ And every time you notice it, you anchor yourself in the present.
989
+
990
+ Over time, this changes your relationship with your inner world.
991
+
992
+ You stop fearing your thoughts.
993
+ You stop running from your emotions.
994
+ You stop judging yourself for being human.
995
+
996
+ You learn that thoughts are just thoughts.
997
+ Emotions are just emotions.
998
+ Sensations rise and fall like waves.
999
+
1000
+ You are the ocean, not the waves.
1001
+
1002
+ This is what gives mindfulness its power.
1003
+
1004
+ It does not remove pain from life.
1005
+ But it removes the extra suffering we create around pain.
1006
+
1007
+ It does not promise happiness.
1008
+ But it creates peace even when happiness is absent.
1009
+
1010
+ It does not change your external circumstances.
1011
+ But it changes how you experience them.
1012
+
1013
+ And that changes everything.
1014
+
1015
+ Mindfulness teaches you to meet yourself with compassion.
1016
+ To treat your inner experience with the same kindness you would offer a dear friend.
1017
+ To stop being your own harshest critic.
1018
+ To become your own safe place.
1019
+
1020
+ This is not weakness.
1021
+ This is strength.
1022
+
1023
+ Because only a strong mind can be gentle.
1024
+ Only a brave heart can stay present with discomfort.
1025
+ Only a wise soul can choose awareness over avoidance.
1026
+
1027
+ Every moment of mindfulness is a moment of freedom.
1028
+ Freedom from automatic reactions.
1029
+ Freedom from old patterns.
1030
+ Freedom from unnecessary suffering.
1031
+
1032
+ And with practice, that freedom grows.
1033
+
1034
+ You do not have to be perfect.
1035
+ You do not have to meditate for hours.
1036
+ You do not have to do this “right.”
1037
+
1038
+ You only have to begin.
1039
+
1040
+ One breath.
1041
+ One moment.
1042
+ One act of awareness at a time.
1043
+
1044
+ And slowly, gently, quietly —
1045
+ Your relationship with yourself changes.
1046
+ Your relationship with your mind changes.
1047
+ Your relationship with your life changes.
1048
+
1049
+ That is the power of mindfulness.
1050
+ """
1051
+
1052
+ },
1053
+ {
1054
+ "title": "Cognitive Distortions and How to Combat Them",
1055
+ "read_time": "12 min",
1056
+ "category": "CBT",
1057
+ "summary": "Identify and challenge unhelpful thinking patterns.",
1058
+ "content": """Our minds are powerful, but they can also play tricks on us.
1059
+ Cognitive distortions are biased ways of thinking that cause us to see reality inaccurately.
1060
+ They fuel anxiety, depression, stress, and self-doubt — often without us even noticing.
1061
+
1062
+ Some common distortions include:
1063
+
1064
+ 1. **All-or-Nothing Thinking**
1065
+ Seeing things in black or white, with no middle ground.
1066
+ “If I fail this task, I’m a complete failure.”
1067
+
1068
+ 2. **Overgeneralization**
1069
+ Taking one event and assuming it defines everything.
1070
+ “I didn’t do well today, so I’ll never succeed.”
1071
+
1072
+ 3. **Mental Filtering**
1073
+ Focusing solely on negative details, ignoring positives.
1074
+ “I made a mistake in the presentation, so the whole talk was awful.”
1075
+
1076
+ 4. **Disqualifying the Positive**
1077
+ Dismissing your achievements or compliments.
1078
+ “They said I did a good job, but they were just being polite.”
1079
+
1080
+ 5. **Jumping to Conclusions**
1081
+ Making assumptions without evidence:
1082
+ - Mind reading: “They think I’m incompetent.”
1083
+ - Fortune telling: “This will end badly.”
1084
+
1085
+ 6. **Catastrophizing**
1086
+ Exaggerating the negative outcome.
1087
+ “If I make a small mistake, it will ruin everything.”
1088
+
1089
+ 7. **Emotional Reasoning**
1090
+ Believing feelings reflect facts.
1091
+ “I feel guilty, so I must have done something wrong.”
1092
+
1093
+ 8. **Should Statements**
1094
+ Setting unrealistic expectations for yourself or others.
1095
+ “I should always be productive. I must never fail.”
1096
+
1097
+ 9. **Labeling**
1098
+ Attaching a negative label to yourself or others.
1099
+ “I’m useless.” “They’re a bad person.”
1100
+
1101
+ 10. **Personalization**
1102
+ Taking responsibility for events beyond your control.
1103
+ “It’s my fault that the team missed the deadline.”
1104
+
1105
+ ---
1106
+
1107
+ ### How to Combat Cognitive Distortions
1108
+
1109
+ **1. Awareness is Key**
1110
+ Start noticing when your thoughts become distorted. Awareness is the first step toward change.
1111
+
1112
+ **2. Challenge the Thought**
1113
+ Ask yourself:
1114
+ - What is the evidence for this thought?
1115
+ - Is there another way to view this situation?
1116
+ - Would I say this to a friend?
1117
+
1118
+ **3. Reframe Positively**
1119
+ Replace distortions with balanced, realistic thoughts.
1120
+ - Instead of: “I always fail,” try: “Sometimes I struggle, but I also succeed.”
1121
+
1122
+ **4. Record and Reflect**
1123
+ Maintain a thought diary. Write down your negative thoughts, the distortion, and a rational counter-thought.
1124
+
1125
+ **5. Practice Self-Compassion**
1126
+ Mistakes do not define you. Treat yourself with the kindness you would show a friend.
1127
+
1128
+ **6. Use Mindfulness**
1129
+ Observe your thoughts without judgment. Let them pass rather than reacting automatically.
1130
+
1131
+ **7. Seek Evidence**
1132
+ Challenge assumptions by looking for proof. Facts often contradict distorted thoughts.
1133
+
1134
+ **8. Gradual Exposure**
1135
+ Face situations you fear instead of avoiding them. This weakens distorted thinking over time.
1136
+
1137
+ **9. Cognitive Behavioral Exercises**
1138
+ - Thought records
1139
+ - Behavioral experiments
1140
+ - Challenging core beliefs
1141
+
1142
+ **10. Professional Support**
1143
+ CBT therapists can guide you in identifying distortions and building healthier thinking patterns.
1144
+
1145
+ ---
1146
+
1147
+ ### Why This Matters
1148
+
1149
+ Cognitive distortions shape your reality.
1150
+ They influence your emotions, behaviors, and decisions.
1151
+ By recognizing and challenging them, you:
1152
+
1153
+ - Reduce anxiety and stress
1154
+ - Improve mood and self-esteem
1155
+ - Make clearer, rational decisions
1156
+ - Build resilience and emotional intelligence
1157
+
1158
+ Your mind is not your enemy.
1159
+ It is a tool. And like any tool, it works best when sharpened and guided.
1160
+
1161
+ Transforming your thoughts transforms your life.
1162
+ """
1163
+
1164
+ },
1165
+ {
1166
+ "title": "Building Healthy Sleep Habits",
1167
+ "read_time": "6 min",
1168
+ "category": "Sleep",
1169
+ "summary": "Create a sleep routine that works for you.",
1170
+ "content": """Sleep is not just a break from life—it’s a critical pillar of mental, emotional, and physical health.
1171
+ Yet in today’s fast-paced world, many struggle to get restorative rest.
1172
+ Building healthy sleep habits can transform your energy, mood, and overall wellbeing.
1173
+
1174
+ ---
1175
+
1176
+ ### Why Sleep Matters
1177
+
1178
+ - **Brain Function:** Sleep enhances memory, learning, and decision-making.
1179
+ - **Emotional Health:** Proper rest reduces irritability, anxiety, and depression.
1180
+ - **Physical Health:** Supports immune function, metabolism, and heart health.
1181
+ - **Energy & Focus:** Restorative sleep fuels productivity and creativity.
1182
+
1183
+ ---
1184
+
1185
+ ### Common Sleep Challenges
1186
+
1187
+ - Trouble falling asleep
1188
+ - Waking up frequently at night
1189
+ - Feeling tired despite adequate hours
1190
+ - Insomnia caused by stress or overthinking
1191
+
1192
+ ---
1193
+
1194
+ ### Science-Backed Ways to Improve Sleep
1195
+
1196
+ 1. **Set a Consistent Sleep Schedule**
1197
+ Go to bed and wake up at the same time every day—even on weekends.
1198
+ Your body thrives on routine.
1199
+
1200
+ 2. **Create a Sleep-Inducing Environment**
1201
+ - Keep your bedroom dark, cool, and quiet
1202
+ - Use blackout curtains or eye masks
1203
+ - Remove electronic distractions
1204
+
1205
+ 3. **Limit Screen Time Before Bed**
1206
+ The blue light from phones, tablets, and TVs interferes with melatonin production.
1207
+ Aim for at least 60 minutes of screen-free time before sleep.
1208
+
1209
+ 4. **Wind Down with a Nighttime Routine**
1210
+ - Gentle stretching or yoga
1211
+ - Deep breathing exercises
1212
+ - Journaling or gratitude reflections
1213
+ - Reading a physical book
1214
+
1215
+ 5. **Mind Your Diet and Beverages**
1216
+ - Avoid caffeine and nicotine in the evening
1217
+ - Limit heavy meals before bedtime
1218
+ - Consider herbal teas like chamomile or lavender
1219
+
1220
+ 6. **Stay Active During the Day**
1221
+ Regular physical activity improves sleep quality, but avoid intense exercise right before bed.
1222
+
1223
+ 7. **Manage Stress and Anxiety**
1224
+ Mindfulness, meditation, and cognitive-behavioral strategies help calm racing thoughts at night.
1225
+
1226
+ 8. **Use the Bed for Sleep Only**
1227
+ Avoid working, scrolling, or watching TV in bed.
1228
+ This strengthens the mental association between bed and sleep.
1229
+
1230
+ 9. **Expose Yourself to Natural Light**
1231
+ Morning sunlight helps regulate your circadian rhythm, signaling your body when to wake and sleep.
1232
+
1233
+ 10. **Limit Naps**
1234
+ Short naps (20–30 minutes) are fine, but long or late-day naps can interfere with nighttime sleep.
1235
+
1236
+ ---
1237
+
1238
+ ### Tips for a Powerful Sleep Routine
1239
+
1240
+ - Stick to a fixed “wind-down” ritual every night
1241
+ - Track sleep patterns in a journal or app
1242
+ - Listen to relaxing audio like guided meditations or nature sounds
1243
+ - Practice gratitude or visualization to calm the mind
1244
+
1245
+ ---
1246
+
1247
+ ### Transform Your Life, One Night at a Time
1248
+
1249
+ Healthy sleep is the foundation of a thriving mind and body.
1250
+ Small changes—like dimming lights, setting a bedtime, or practicing mindfulness—create big results over time.
1251
+
1252
+ By committing to consistent sleep habits, you unlock:
1253
+
1254
+ - Better emotional resilience
1255
+ - Clearer thinking and focus
1256
+ - Stronger immunity
1257
+ - A more balanced, joyful life
1258
+
1259
+ Sleep well, live well, thrive.
1260
+ """
1261
+
1262
+ }
1263
+ ]
1264
+
1265
+ for article in articles:
1266
+ with st.expander(f"📖 {article['title']} ({article['read_time']} read)"):
1267
+ st.caption(f"🏷️ {article['category']}")
1268
+ st.markdown(article['summary'])
1269
+
1270
+ if st.button("📚 Read Full Article", key=f"article_{article['title']}"):
1271
+ #st.info("📖 Full article would open here!")
1272
+ st.markdown(article.get('content', 'Full content not available.'))
1273
+
1274
+ resources_col.insert_one({
1275
+ "username": username,
1276
+ "type": "article",
1277
+ "title": article['title'],
1278
+ "timestamp": datetime.datetime.utcnow()
1279
+ })
1280
+
1281
+ # -------------------- 🎮 INTERACTIVE TOOLS --------------------
1282
+ def interactive_tools_page(username):
1283
+ st.title("🎮 Interactive Wellness Tools")
1284
+ st.markdown("Creative tools to support your mental health journey")
1285
+
1286
+ tab1, tab2, tab3 = st.tabs(["🎨 Mood Board", "🙏 Gratitude Jar", "📦 Worry Box"])
1287
+
1288
+ with tab1:
1289
+ mood_board_tool(username)
1290
+
1291
+ with tab2:
1292
+ gratitude_jar_tool(username)
1293
+
1294
+ with tab3:
1295
+ worry_box_tool(username)
1296
+
1297
+ def mood_board_tool(username):
1298
+ st.subheader("🎨 Mood Board Creator")
1299
+ st.markdown("Express your emotions visually through colors, words, and symbols")
1300
+
1301
+ col1, col2 = st.columns([2, 1])
1302
+
1303
+ with col1:
1304
+ # Current mood
1305
+ current_mood = st.select_slider(
1306
+ "How are you feeling right now?",
1307
+ options=["😢 Very Sad", "😔 Down", "😐 Neutral", "🙂 Good", "😊 Great"],
1308
+ value="😐 Neutral"
1309
+ )
1310
+
1311
+ # Color selection
1312
+ mood_color = st.color_picker("Pick a color that represents your mood:", "#FF6B6B")
1313
+
1314
+ # Words/phrases
1315
+ mood_words = st.text_area(
1316
+ "Add words or phrases that describe your feelings:",
1317
+ placeholder="peaceful, hopeful, anxious, calm..."
1318
+ )
1319
+
1320
+ # Emoji selection
1321
+ selected_emojis = st.multiselect(
1322
+ "Add emojis to your board:",
1323
+ ["😊", "😢", "😠", "😰", "🌟", "💪", "🌈", "☀️", "🌙", "💚", "🦋", "🌸"]
1324
+ )
1325
+
1326
+ if st.button("💾 Save Mood Board", use_container_width=True):
1327
+ mood_board = {
1328
+ "username": username,
1329
+ "mood": current_mood,
1330
+ "color": mood_color,
1331
+ "words": mood_words,
1332
+ "emojis": selected_emojis,
1333
+ "timestamp": datetime.datetime.utcnow()
1334
+ }
1335
+
1336
+ mood_board_col.insert_one(mood_board)
1337
+ st.success("✅ Mood board saved! Check your gallery below.")
1338
+ st.rerun()
1339
+
1340
+ with col2:
1341
+ st.markdown("### 💡 Tips")
1342
+ st.info("""
1343
+ **Mood boarding helps:**
1344
+ - Express complex emotions
1345
+ - Track emotional patterns
1346
+ - Increase self-awareness
1347
+ - Process feelings creatively
1348
+ """)
1349
+
1350
+ # Gallery of past mood boards
1351
+ st.markdown("---")
1352
+ st.markdown("### 🖼️ Your Mood Board Gallery")
1353
+
1354
+ past_boards = list(mood_board_col.find(
1355
+ {"username": username}
1356
+ ).sort("timestamp", -1).limit(12))
1357
+
1358
+ if past_boards:
1359
+ cols = st.columns(3)
1360
+
1361
+ for idx, board in enumerate(past_boards):
1362
+ with cols[idx % 3]:
1363
+ st.markdown(
1364
+ f"""
1365
+ <div style='background-color: {board['color']};
1366
+ padding: 20px; border-radius: 10px;
1367
+ text-align: center; min-height: 150px;'>
1368
+ <div style='font-size: 2rem;'>{board['mood'].split()[0]}</div>
1369
+ <div style='margin: 10px 0;'>{' '.join(board.get('emojis', []))}</div>
1370
+ <div style='font-size: 0.8rem; color: #333;'>
1371
+ {board['timestamp'].strftime('%b %d')}
1372
+ </div>
1373
+ </div>
1374
+ """,
1375
+ unsafe_allow_html=True
1376
+ )
1377
+
1378
+ with st.expander("View details"):
1379
+ st.markdown(f"**Mood:** {board['mood']}")
1380
+ if board.get('words'):
1381
+ st.markdown(f"**Words:** {board['words']}")
1382
+ else:
1383
+ st.info("🎨 Create your first mood board above!")
1384
+
1385
+ def gratitude_jar_tool(username):
1386
+ st.subheader("🙏 Gratitude Jar")
1387
+ st.markdown("Fill your virtual jar with things you're grateful for")
1388
+
1389
+ col1, col2 = st.columns([2, 1])
1390
+
1391
+ with col1:
1392
+ # Add gratitude
1393
+ gratitude_text = st.text_area(
1394
+ "What are you grateful for today?",
1395
+ placeholder="I'm grateful for...",
1396
+ height=100
1397
+ )
1398
+
1399
+ category = st.selectbox(
1400
+ "Category:",
1401
+ ["🤝 People", "🌟 Experience", "💪 Personal Growth",
1402
+ "🏠 Home & Comfort", "🌍 Nature", "💼 Work", "💚 Health", "🎨 Creativity"]
1403
+ )
1404
+
1405
+ if st.button("🙏 Add to Jar", use_container_width=True):
1406
+ if gratitude_text:
1407
+ gratitude_jar_col.insert_one({
1408
+ "username": username,
1409
+ "text": gratitude_text,
1410
+ "category": category,
1411
+ "timestamp": datetime.datetime.utcnow()
1412
+ })
1413
+ st.success("✅ Added to your gratitude jar!")
1414
+ st.balloons()
1415
+ st.rerun()
1416
+ else:
1417
+ st.warning("⚠️ Please write something you're grateful for")
1418
+
1419
+ with col2:
1420
+ # Jar visualization
1421
+ jar_count = gratitude_jar_col.count_documents({"username": username})
1422
+
1423
+ st.markdown("### 🏺 Your Jar")
1424
+ st.markdown(
1425
+ f"""
1426
+ <div style='text-align: center; padding: 30px;
1427
+ background: linear-gradient(180deg, rgba(255,215,0,0.3) 0%, rgba(255,165,0,0.5) 100%);
1428
+ border-radius: 20px; border: 3px solid #FFD700;'>
1429
+ <div style='font-size: 4rem;'>🏺</div>
1430
+ <div style='font-size: 2rem; font-weight: bold; color: #FF8C00;'>{jar_count}</div>
1431
+ <div style='color: #666;'>gratitude notes</div>
1432
+ </div>
1433
+ """,
1434
+ unsafe_allow_html=True
1435
+ )
1436
+
1437
+ # View gratitudes
1438
+ st.markdown("---")
1439
+ st.markdown("### 📖 Your Gratitude Collection")
1440
+
1441
+ # Filter by category
1442
+ filter_category = st.selectbox(
1443
+ "Filter by category:",
1444
+ ["All"] + ["🤝 People", "🌟 Experience", "💪 Personal Growth",
1445
+ "🏠 Home & Comfort", "🌍 Nature", "💼 Work", "💚 Health", "🎨 Creativity"],
1446
+ key="gratitude_filter"
1447
+ )
1448
+
1449
+ # Get gratitudes
1450
+ query = {"username": username}
1451
+ if filter_category != "All":
1452
+ query["category"] = filter_category
1453
+
1454
+ gratitudes = list(gratitude_jar_col.find(query).sort("timestamp", -1).limit(20))
1455
+
1456
+ if gratitudes:
1457
+ for gratitude in gratitudes:
1458
+ with st.container():
1459
+ col1, col2 = st.columns([5, 1])
1460
+
1461
+ with col1:
1462
+ st.markdown(f"**{gratitude['category']}** • {gratitude['timestamp'].strftime('%b %d, %Y')}")
1463
+ st.markdown(f"_{gratitude['text']}_")
1464
+
1465
+ with col2:
1466
+ if st.button("🗑️", key=f"del_grat_{gratitude['_id']}"):
1467
+ gratitude_jar_col.delete_one({"_id": gratitude["_id"]})
1468
+ st.rerun()
1469
+
1470
+ st.markdown("---")
1471
+ else:
1472
+ st.info("🙏 Start adding gratitude notes to fill your jar!")
1473
+
1474
+ def worry_box_tool(username):
1475
+ st.subheader("📦 Worry Box")
1476
+ st.markdown("Write down your worries and store them away - revisit them later with perspective")
1477
+
1478
+ col1, col2 = st.columns([2, 1])
1479
+
1480
+ with col1:
1481
+ # Add worry
1482
+ worry_text = st.text_area(
1483
+ "What's worrying you?",
1484
+ placeholder="Write your worry here...",
1485
+ height=120
1486
+ )
1487
+
1488
+ worry_intensity = st.select_slider(
1489
+ "How intense is this worry?",
1490
+ options=["😌 Mild", "😟 Moderate", "😰 Severe", "😱 Overwhelming"],
1491
+ value="😟 Moderate"
1492
+ )
1493
+
1494
+ can_control = st.radio(
1495
+ "Can you control this?",
1496
+ ["✅ Yes, I can take action", "❌ No, it's out of my control"],
1497
+ horizontal=True
1498
+ )
1499
+
1500
+ if st.button("📦 Put in Worry Box", use_container_width=True):
1501
+ if worry_text:
1502
+ worry_box_col.insert_one({
1503
+ "username": username,
1504
+ "text": worry_text,
1505
+ "intensity": worry_intensity,
1506
+ "controllable": can_control,
1507
+ "status": "active",
1508
+ "created_at": datetime.datetime.utcnow(),
1509
+ "resolved_at": None
1510
+ })
1511
+ st.success("✅ Worry stored in your box. You can come back to it later.")
1512
+ st.rerun()
1513
+ else:
1514
+ st.warning("⚠️ Please write your worry first")
1515
+
1516
+ with col2:
1517
+ st.markdown("### 💡 How it Works")
1518
+ st.info("""
1519
+ 1. **Write** your worry down
1520
+ 2. **Store** it in the box
1521
+ 3. **Let go** for now
1522
+ 4. **Revisit** later with fresh perspective
1523
+ 5. **Resolve** or release it
1524
+ """)
1525
+
1526
+ # Box visualization
1527
+ active_worries = worry_box_col.count_documents({
1528
+ "username": username,
1529
+ "status": "active"
1530
+ })
1531
+
1532
+ st.markdown(
1533
+ f"""
1534
+ <div style='text-align: center; padding: 30px;
1535
+ background: linear-gradient(180deg, rgba(156,136,255,0.2) 0%, rgba(99,102,241,0.3) 100%);
1536
+ border-radius: 15px; border: 3px solid #6366F1;'>
1537
+ <div style='font-size: 4rem;'>📦</div>
1538
+ <div style='font-size: 2rem; font-weight: bold; color: #4F46E5;'>{active_worries}</div>
1539
+ <div style='color: #666;'>active worries</div>
1540
+ </div>
1541
+ """,
1542
+ unsafe_allow_html=True
1543
+ )
1544
+
1545
+ # View worries
1546
+ st.markdown("---")
1547
+
1548
+ tab1, tab2, tab3 = st.tabs(["📦 Active Worries", "✅ Resolved", "📊 Worry Insights"])
1549
+
1550
+ with tab1:
1551
+ display_active_worries(username)
1552
+
1553
+ with tab2:
1554
+ display_resolved_worries(username)
1555
+
1556
+ with tab3:
1557
+ worry_insights(username)
1558
+
1559
+ def display_active_worries(username):
1560
+ st.markdown("### 📦 Your Active Worries")
1561
+
1562
+ worries = list(worry_box_col.find({
1563
+ "username": username,
1564
+ "status": "active"
1565
+ }).sort("created_at", -1))
1566
+
1567
+ if not worries:
1568
+ st.success("🎉 Your worry box is empty! That's great!")
1569
+ return
1570
+
1571
+ for worry in worries:
1572
+ with st.expander(
1573
+ f"{worry['intensity'].split()[0]} • "
1574
+ f"{worry['created_at'].strftime('%b %d, %Y')} • "
1575
+ f"{worry['controllable'].split()[0]}"
1576
+ ):
1577
+ st.markdown(f"**Worry:** {worry['text']}")
1578
+ st.markdown(f"**Intensity:** {worry['intensity']}")
1579
+ st.markdown(f"**Can Control:** {worry['controllable']}")
1580
+ st.caption(f"Added {worry['created_at'].strftime('%B %d, %Y at %I:%M %p')}")
1581
+
1582
+ # Action buttons
1583
+ col1, col2, col3 = st.columns(3)
1584
+
1585
+ with col1:
1586
+ if st.button("✅ Mark Resolved", key=f"resolve_{worry['_id']}"):
1587
+ worry_box_col.update_one(
1588
+ {"_id": worry["_id"]},
1589
+ {
1590
+ "$set": {
1591
+ "status": "resolved",
1592
+ "resolved_at": datetime.datetime.utcnow()
1593
+ }
1594
+ }
1595
+ )
1596
+ st.success("Worry resolved! 🎉")
1597
+ st.rerun()
1598
+
1599
+ with col2:
1600
+ if st.button("🗑️ Delete", key=f"delete_{worry['_id']}"):
1601
+ worry_box_col.delete_one({"_id": worry["_id"]})
1602
+ st.rerun()
1603
+
1604
+ with col3:
1605
+ # Suggest coping strategy
1606
+ if worry['controllable'].startswith("✅"):
1607
+ st.info("💡 Create an action plan!")
1608
+ else:
1609
+ st.info("💡 Practice acceptance")
1610
+
1611
+ def display_resolved_worries(username):
1612
+ st.markdown("### ✅ Resolved Worries")
1613
+
1614
+ resolved = list(worry_box_col.find({
1615
+ "username": username,
1616
+ "status": "resolved"
1617
+ }).sort("resolved_at", -1).limit(20))
1618
+
1619
+ if not resolved:
1620
+ st.info("No resolved worries yet. Keep working through your active worries!")
1621
+ return
1622
+
1623
+ for worry in resolved:
1624
+ with st.expander(f"✅ {worry['created_at'].strftime('%b %d')} → {worry['resolved_at'].strftime('%b %d')}"):
1625
+ st.markdown(f"**Worry:** {worry['text']}")
1626
+
1627
+ days_to_resolve = (worry['resolved_at'] - worry['created_at']).days
1628
+ st.caption(f"Resolved in {days_to_resolve} day(s)")
1629
+
1630
+ def worry_insights(username):
1631
+ st.markdown("### 📊 Worry Patterns & Insights")
1632
+
1633
+ all_worries = list(worry_box_col.find({"username": username}))
1634
+
1635
+ if not all_worries:
1636
+ st.info("Start using the worry box to see insights!")
1637
+ return
1638
+
1639
+ df = pd.DataFrame(all_worries)
1640
+
1641
+ # Metrics
1642
+ col1, col2, col3, col4 = st.columns(4)
1643
+
1644
+ with col1:
1645
+ total = len(all_worries)
1646
+ st.metric("Total Worries", total)
1647
+
1648
+ with col2:
1649
+ active = len([w for w in all_worries if w['status'] == 'active'])
1650
+ st.metric("Active", active)
1651
+
1652
+ with col3:
1653
+ resolved = len([w for w in all_worries if w['status'] == 'resolved'])
1654
+ st.metric("Resolved", resolved)
1655
+
1656
+ with col4:
1657
+ if resolved > 0:
1658
+ resolution_rate = (resolved / total) * 100
1659
+ st.metric("Resolution Rate", f"{resolution_rate:.0f}%")
1660
+
1661
+ # Intensity distribution
1662
+ st.markdown("---")
1663
+ st.markdown("#### Worry Intensity Distribution")
1664
+
1665
+ intensity_counts = df['intensity'].value_counts()
1666
+
1667
+ fig_intensity = px.pie(
1668
+ values=intensity_counts.values,
1669
+ names=intensity_counts.index,
1670
+ title="Distribution of Worry Intensity"
1671
+ )
1672
+ st.plotly_chart(fig_intensity, use_container_width=True)
1673
+
1674
+ # Controllable vs Uncontrollable
1675
+ st.markdown("#### Controllable vs Uncontrollable Worries")
1676
+
1677
+ controllable_counts = df['controllable'].value_counts()
1678
+
1679
+ col1, col2 = st.columns(2)
1680
+
1681
+ with col1:
1682
+ can_control = sum([1 for w in all_worries if w['controllable'].startswith('✅')])
1683
+ cannot_control = sum([1 for w in all_worries if w['controllable'].startswith('❌')])
1684
+
1685
+ st.metric("Can Control", can_control, help="Worries you can take action on")
1686
+ st.metric("Cannot Control", cannot_control, help="Worries outside your control")
1687
+
1688
+ with col2:
1689
+ st.info("""
1690
+ **💡 Insight:**
1691
+
1692
+ Focus energy on controllable worries.
1693
+ For uncontrollable ones, practice
1694
+ acceptance and letting go.
1695
+ """)
1696
+
1697
+ # -------------------- MAIN PHASE 3 ROUTER --------------------
1698
+ def phase3_main(username, page):
1699
+ """
1700
+ Main router for Phase 3 features
1701
+
1702
+ Args:
1703
+ username: Current logged-in user
1704
+ page: Which page to display
1705
+ """
1706
+
1707
+ if page == "🎯 Coping Plans":
1708
+ coping_plans_page(username)
1709
+
1710
+ elif page == "📚 Resource Library":
1711
+ resource_library_page(username)
1712
+
1713
+ elif page == "🎮 Interactive Tools":
1714
+ interactive_tools_page(username)
1715
+
1716
+ # -------------------- INTEGRATION INSTRUCTIONS --------------------
1717
+ """
1718
+ HOW TO INTEGRATE PHASE 3 WITH YOUR MAIN APP:
1719
+
1720
+ 1. Save this file as: phase3_interventions.py
1721
+
1722
+ 2. Import in your final.py (at the top):
1723
+
1724
+ import phase3_interventions as phase3
1725
+
1726
+ 3. Add Phase 3 pages to sidebar navigation (in chat_page function):
1727
+
1728
+ page = st.radio("📍 Navigate", [
1729
+ "💬 Chat",
1730
+ " virtual_chat",
1731
+ "📊 Analytics",
1732
+ "ℹ️ Resources",
1733
+ "🗓️ Mood Journal",
1734
+ "🎯 Goals",
1735
+ "📚 Exercises",
1736
+ "🏆 Achievements",
1737
+ "🔔 Reminders",
1738
+ "🎯 Coping Plans", # NEW - Phase 3
1739
+ "📚 Resource Library", # NEW - Phase 3
1740
+ "🎮 Interactive Tools" # NEW - Phase 3
1741
+ ])
1742
+
1743
+ 4. Update routing in chat_page function:
1744
+
1745
+ # Phase 3 routing
1746
+ if page in ["🎯 Coping Plans", "📚 Resource Library", "🎮 Interactive Tools"]:
1747
+ phase3.phase3_main(st.session_state.username, page)
1748
+ # Phase 2 routing
1749
+ elif page in ["🗓️ Mood Journal", "🎯 Goals", "📚 Exercises",
1750
+ "🏆 Achievements", "🔔 Reminders"]:
1751
+ phase2.phase2_main(st.session_state.username, page)
1752
+ # Original pages
1753
+ elif page == "💬 Chat":
1754
+ chat_interface()
1755
+ elif page == "📊 Analytics":
1756
+ analytics_page()
1757
+ else:
1758
+ resources_page()
1759
+
1760
+ PHASE 3 FEATURES INCLUDED:
1761
+ ✅ Personalized Coping Plans (based on user data)
1762
+ ✅ Custom Breathing Exercises
1763
+ ✅ Daily Schedule Generator
1764
+ ✅ Video Tutorial Library
1765
+ ✅ Audio Guided Sessions
1766
+ ✅ CBT Worksheets
1767
+ ✅ Educational Articles
1768
+ ✅ Mood Board Creator (visual expression)
1769
+ ✅ Gratitude Jar (positivity building)
1770
+ ✅ Worry Box (worry management)
1771
+ ✅ Comprehensive insights and analytics
1772
+
1773
+ All features use your existing MongoDB database!
1774
+ """
rag_knowledges/anxiety.json ADDED
The diff for this file is too large to render. See raw diff
 
rag_knowledges/depression.json ADDED
@@ -0,0 +1,2002 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "user_input": "I feel hopeless every day",
4
+ "bot_response": "Hopelessness is heavy. You're not alone.",
5
+ "bot_followup": "What's making you feel this way?"
6
+ },
7
+ {
8
+ "user_input": "Nothing matters anymore every day",
9
+ "bot_response": "When meaning fades, it's deeply painful.",
10
+ "bot_followup": "When did things start feeling meaningless?"
11
+ },
12
+ {
13
+ "user_input": "I see no point every day",
14
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
15
+ "bot_followup": "What used to give you purpose?"
16
+ },
17
+ {
18
+ "user_input": "I feel empty every day",
19
+ "bot_response": "Emptiness is profound. I'm here with you.",
20
+ "bot_followup": "How long have you felt empty?"
21
+ },
22
+ {
23
+ "user_input": "Life feels meaningless every day",
24
+ "bot_response": "Existential pain is real. You matter.",
25
+ "bot_followup": "What's changed recently?"
26
+ },
27
+ {
28
+ "user_input": "I have no hope every day",
29
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
30
+ "bot_followup": "What would hope look like?"
31
+ },
32
+ {
33
+ "user_input": "Everything is pointless every day",
34
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
35
+ "bot_followup": "What feels most pointless?"
36
+ },
37
+ {
38
+ "user_input": "I'm in despair every day",
39
+ "bot_response": "Despair is overwhelming. Please don't give up.",
40
+ "bot_followup": "What's causing this despair?"
41
+ },
42
+ {
43
+ "user_input": "I feel defeated every day",
44
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
45
+ "bot_followup": "What battles are you fighting?"
46
+ },
47
+ {
48
+ "user_input": "Nothing will get better every day",
49
+ "bot_response": "That permanence feeling is a depression symptom.",
50
+ "bot_followup": "Have you felt this way before?"
51
+ },
52
+ {
53
+ "user_input": "I feel hopeless all the time",
54
+ "bot_response": "Hopelessness is heavy. You're not alone.",
55
+ "bot_followup": "What's making you feel this way?"
56
+ },
57
+ {
58
+ "user_input": "Nothing matters anymore all the time",
59
+ "bot_response": "When meaning fades, it's deeply painful.",
60
+ "bot_followup": "When did things start feeling meaningless?"
61
+ },
62
+ {
63
+ "user_input": "I see no point all the time",
64
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
65
+ "bot_followup": "What used to give you purpose?"
66
+ },
67
+ {
68
+ "user_input": "I feel empty all the time",
69
+ "bot_response": "Emptiness is profound. I'm here with you.",
70
+ "bot_followup": "How long have you felt empty?"
71
+ },
72
+ {
73
+ "user_input": "Life feels meaningless all the time",
74
+ "bot_response": "Existential pain is real. You matter.",
75
+ "bot_followup": "What's changed recently?"
76
+ },
77
+ {
78
+ "user_input": "I have no hope all the time",
79
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
80
+ "bot_followup": "What would hope look like?"
81
+ },
82
+ {
83
+ "user_input": "Everything is pointless all the time",
84
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
85
+ "bot_followup": "What feels most pointless?"
86
+ },
87
+ {
88
+ "user_input": "I'm in despair all the time",
89
+ "bot_response": "Despair is overwhelming. Please don't give up.",
90
+ "bot_followup": "What's causing this despair?"
91
+ },
92
+ {
93
+ "user_input": "I feel defeated all the time",
94
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
95
+ "bot_followup": "What battles are you fighting?"
96
+ },
97
+ {
98
+ "user_input": "Nothing will get better all the time",
99
+ "bot_response": "That permanence feeling is a depression symptom.",
100
+ "bot_followup": "Have you felt this way before?"
101
+ },
102
+ {
103
+ "user_input": "I feel hopeless and I am tired",
104
+ "bot_response": "Hopelessness is heavy. You're not alone.",
105
+ "bot_followup": "What's making you feel this way?"
106
+ },
107
+ {
108
+ "user_input": "Nothing matters anymore and I am tired",
109
+ "bot_response": "When meaning fades, it's deeply painful.",
110
+ "bot_followup": "When did things start feeling meaningless?"
111
+ },
112
+ {
113
+ "user_input": "I see no point and I am tired",
114
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
115
+ "bot_followup": "What used to give you purpose?"
116
+ },
117
+ {
118
+ "user_input": "I feel empty and I am tired",
119
+ "bot_response": "Emptiness is profound. I'm here with you.",
120
+ "bot_followup": "How long have you felt empty?"
121
+ },
122
+ {
123
+ "user_input": "Life feels meaningless and I am tired",
124
+ "bot_response": "Existential pain is real. You matter.",
125
+ "bot_followup": "What's changed recently?"
126
+ },
127
+ {
128
+ "user_input": "I have no hope and I am tired",
129
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
130
+ "bot_followup": "What would hope look like?"
131
+ },
132
+ {
133
+ "user_input": "Everything is pointless and I am tired",
134
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
135
+ "bot_followup": "What feels most pointless?"
136
+ },
137
+ {
138
+ "user_input": "I'm in despair and I am tired",
139
+ "bot_response": "Despair is overwhelming. Please don't give up.",
140
+ "bot_followup": "What's causing this despair?"
141
+ },
142
+ {
143
+ "user_input": "I feel defeated and I am tired",
144
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
145
+ "bot_followup": "What battles are you fighting?"
146
+ },
147
+ {
148
+ "user_input": "Nothing will get better and I am tired",
149
+ "bot_response": "That permanence feeling is a depression symptom.",
150
+ "bot_followup": "Have you felt this way before?"
151
+ },
152
+ {
153
+ "user_input": "I feel hopeless constantly",
154
+ "bot_response": "Hopelessness is heavy. You're not alone.",
155
+ "bot_followup": "What's making you feel this way?"
156
+ },
157
+ {
158
+ "user_input": "Nothing matters anymore constantly",
159
+ "bot_response": "When meaning fades, it's deeply painful.",
160
+ "bot_followup": "When did things start feeling meaningless?"
161
+ },
162
+ {
163
+ "user_input": "I see no point constantly",
164
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
165
+ "bot_followup": "What used to give you purpose?"
166
+ },
167
+ {
168
+ "user_input": "I feel empty constantly",
169
+ "bot_response": "Emptiness is profound. I'm here with you.",
170
+ "bot_followup": "How long have you felt empty?"
171
+ },
172
+ {
173
+ "user_input": "Life feels meaningless constantly",
174
+ "bot_response": "Existential pain is real. You matter.",
175
+ "bot_followup": "What's changed recently?"
176
+ },
177
+ {
178
+ "user_input": "I have no hope constantly",
179
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
180
+ "bot_followup": "What would hope look like?"
181
+ },
182
+ {
183
+ "user_input": "Everything is pointless constantly",
184
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
185
+ "bot_followup": "What feels most pointless?"
186
+ },
187
+ {
188
+ "user_input": "I'm in despair constantly",
189
+ "bot_response": "Despair is overwhelming. Please don't give up.",
190
+ "bot_followup": "What's causing this despair?"
191
+ },
192
+ {
193
+ "user_input": "I feel defeated constantly",
194
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
195
+ "bot_followup": "What battles are you fighting?"
196
+ },
197
+ {
198
+ "user_input": "Nothing will get better constantly",
199
+ "bot_response": "That permanence feeling is a depression symptom.",
200
+ "bot_followup": "Have you felt this way before?"
201
+ },
202
+ {
203
+ "user_input": "I feel hopeless every day",
204
+ "bot_response": "Hopelessness is heavy. You're not alone.",
205
+ "bot_followup": "What's making you feel this way?"
206
+ },
207
+ {
208
+ "user_input": "Nothing matters anymore every day",
209
+ "bot_response": "When meaning fades, it's deeply painful.",
210
+ "bot_followup": "When did things start feeling meaningless?"
211
+ },
212
+ {
213
+ "user_input": "I see no point every day",
214
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
215
+ "bot_followup": "What used to give you purpose?"
216
+ },
217
+ {
218
+ "user_input": "I feel empty every day",
219
+ "bot_response": "Emptiness is profound. I'm here with you.",
220
+ "bot_followup": "How long have you felt empty?"
221
+ },
222
+ {
223
+ "user_input": "Life feels meaningless every day",
224
+ "bot_response": "Existential pain is real. You matter.",
225
+ "bot_followup": "What's changed recently?"
226
+ },
227
+ {
228
+ "user_input": "I have no hope every day",
229
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
230
+ "bot_followup": "What would hope look like?"
231
+ },
232
+ {
233
+ "user_input": "Everything is pointless every day",
234
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
235
+ "bot_followup": "What feels most pointless?"
236
+ },
237
+ {
238
+ "user_input": "I'm in despair every day",
239
+ "bot_response": "Despair is overwhelming. Please don't give up.",
240
+ "bot_followup": "What's causing this despair?"
241
+ },
242
+ {
243
+ "user_input": "I feel defeated every day",
244
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
245
+ "bot_followup": "What battles are you fighting?"
246
+ },
247
+ {
248
+ "user_input": "Nothing will get better every day",
249
+ "bot_response": "That permanence feeling is a depression symptom.",
250
+ "bot_followup": "Have you felt this way before?"
251
+ },
252
+ {
253
+ "user_input": "I feel hopeless all the time",
254
+ "bot_response": "Hopelessness is heavy. You're not alone.",
255
+ "bot_followup": "What's making you feel this way?"
256
+ },
257
+ {
258
+ "user_input": "Nothing matters anymore all the time",
259
+ "bot_response": "When meaning fades, it's deeply painful.",
260
+ "bot_followup": "When did things start feeling meaningless?"
261
+ },
262
+ {
263
+ "user_input": "I see no point all the time",
264
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
265
+ "bot_followup": "What used to give you purpose?"
266
+ },
267
+ {
268
+ "user_input": "I feel empty all the time",
269
+ "bot_response": "Emptiness is profound. I'm here with you.",
270
+ "bot_followup": "How long have you felt empty?"
271
+ },
272
+ {
273
+ "user_input": "Life feels meaningless all the time",
274
+ "bot_response": "Existential pain is real. You matter.",
275
+ "bot_followup": "What's changed recently?"
276
+ },
277
+ {
278
+ "user_input": "I have no hope all the time",
279
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
280
+ "bot_followup": "What would hope look like?"
281
+ },
282
+ {
283
+ "user_input": "Everything is pointless all the time",
284
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
285
+ "bot_followup": "What feels most pointless?"
286
+ },
287
+ {
288
+ "user_input": "I'm in despair all the time",
289
+ "bot_response": "Despair is overwhelming. Please don't give up.",
290
+ "bot_followup": "What's causing this despair?"
291
+ },
292
+ {
293
+ "user_input": "I feel defeated all the time",
294
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
295
+ "bot_followup": "What battles are you fighting?"
296
+ },
297
+ {
298
+ "user_input": "Nothing will get better all the time",
299
+ "bot_response": "That permanence feeling is a depression symptom.",
300
+ "bot_followup": "Have you felt this way before?"
301
+ },
302
+ {
303
+ "user_input": "I feel hopeless and I am tired",
304
+ "bot_response": "Hopelessness is heavy. You're not alone.",
305
+ "bot_followup": "What's making you feel this way?"
306
+ },
307
+ {
308
+ "user_input": "Nothing matters anymore and I am tired",
309
+ "bot_response": "When meaning fades, it's deeply painful.",
310
+ "bot_followup": "When did things start feeling meaningless?"
311
+ },
312
+ {
313
+ "user_input": "I see no point and I am tired",
314
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
315
+ "bot_followup": "What used to give you purpose?"
316
+ },
317
+ {
318
+ "user_input": "I feel empty and I am tired",
319
+ "bot_response": "Emptiness is profound. I'm here with you.",
320
+ "bot_followup": "How long have you felt empty?"
321
+ },
322
+ {
323
+ "user_input": "Life feels meaningless and I am tired",
324
+ "bot_response": "Existential pain is real. You matter.",
325
+ "bot_followup": "What's changed recently?"
326
+ },
327
+ {
328
+ "user_input": "I have no hope and I am tired",
329
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
330
+ "bot_followup": "What would hope look like?"
331
+ },
332
+ {
333
+ "user_input": "Everything is pointless and I am tired",
334
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
335
+ "bot_followup": "What feels most pointless?"
336
+ },
337
+ {
338
+ "user_input": "I'm in despair and I am tired",
339
+ "bot_response": "Despair is overwhelming. Please don't give up.",
340
+ "bot_followup": "What's causing this despair?"
341
+ },
342
+ {
343
+ "user_input": "I feel defeated and I am tired",
344
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
345
+ "bot_followup": "What battles are you fighting?"
346
+ },
347
+ {
348
+ "user_input": "Nothing will get better and I am tired",
349
+ "bot_response": "That permanence feeling is a depression symptom.",
350
+ "bot_followup": "Have you felt this way before?"
351
+ },
352
+ {
353
+ "user_input": "I feel hopeless constantly",
354
+ "bot_response": "Hopelessness is heavy. You're not alone.",
355
+ "bot_followup": "What's making you feel this way?"
356
+ },
357
+ {
358
+ "user_input": "Nothing matters anymore constantly",
359
+ "bot_response": "When meaning fades, it's deeply painful.",
360
+ "bot_followup": "When did things start feeling meaningless?"
361
+ },
362
+ {
363
+ "user_input": "I see no point constantly",
364
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
365
+ "bot_followup": "What used to give you purpose?"
366
+ },
367
+ {
368
+ "user_input": "I feel empty constantly",
369
+ "bot_response": "Emptiness is profound. I'm here with you.",
370
+ "bot_followup": "How long have you felt empty?"
371
+ },
372
+ {
373
+ "user_input": "Life feels meaningless constantly",
374
+ "bot_response": "Existential pain is real. You matter.",
375
+ "bot_followup": "What's changed recently?"
376
+ },
377
+ {
378
+ "user_input": "I have no hope constantly",
379
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
380
+ "bot_followup": "What would hope look like?"
381
+ },
382
+ {
383
+ "user_input": "Everything is pointless constantly",
384
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
385
+ "bot_followup": "What feels most pointless?"
386
+ },
387
+ {
388
+ "user_input": "I'm in despair constantly",
389
+ "bot_response": "Despair is overwhelming. Please don't give up.",
390
+ "bot_followup": "What's causing this despair?"
391
+ },
392
+ {
393
+ "user_input": "I feel defeated constantly",
394
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
395
+ "bot_followup": "What battles are you fighting?"
396
+ },
397
+ {
398
+ "user_input": "Nothing will get better constantly",
399
+ "bot_response": "That permanence feeling is a depression symptom.",
400
+ "bot_followup": "Have you felt this way before?"
401
+ },
402
+ {
403
+ "user_input": "I feel hopeless every day",
404
+ "bot_response": "Hopelessness is heavy. You're not alone.",
405
+ "bot_followup": "What's making you feel this way?"
406
+ },
407
+ {
408
+ "user_input": "Nothing matters anymore every day",
409
+ "bot_response": "When meaning fades, it's deeply painful.",
410
+ "bot_followup": "When did things start feeling meaningless?"
411
+ },
412
+ {
413
+ "user_input": "I see no point every day",
414
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
415
+ "bot_followup": "What used to give you purpose?"
416
+ },
417
+ {
418
+ "user_input": "I feel empty every day",
419
+ "bot_response": "Emptiness is profound. I'm here with you.",
420
+ "bot_followup": "How long have you felt empty?"
421
+ },
422
+ {
423
+ "user_input": "Life feels meaningless every day",
424
+ "bot_response": "Existential pain is real. You matter.",
425
+ "bot_followup": "What's changed recently?"
426
+ },
427
+ {
428
+ "user_input": "I have no hope every day",
429
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
430
+ "bot_followup": "What would hope look like?"
431
+ },
432
+ {
433
+ "user_input": "Everything is pointless every day",
434
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
435
+ "bot_followup": "What feels most pointless?"
436
+ },
437
+ {
438
+ "user_input": "I'm in despair every day",
439
+ "bot_response": "Despair is overwhelming. Please don't give up.",
440
+ "bot_followup": "What's causing this despair?"
441
+ },
442
+ {
443
+ "user_input": "I feel defeated every day",
444
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
445
+ "bot_followup": "What battles are you fighting?"
446
+ },
447
+ {
448
+ "user_input": "Nothing will get better every day",
449
+ "bot_response": "That permanence feeling is a depression symptom.",
450
+ "bot_followup": "Have you felt this way before?"
451
+ },
452
+ {
453
+ "user_input": "I feel hopeless all the time",
454
+ "bot_response": "Hopelessness is heavy. You're not alone.",
455
+ "bot_followup": "What's making you feel this way?"
456
+ },
457
+ {
458
+ "user_input": "Nothing matters anymore all the time",
459
+ "bot_response": "When meaning fades, it's deeply painful.",
460
+ "bot_followup": "When did things start feeling meaningless?"
461
+ },
462
+ {
463
+ "user_input": "I see no point all the time",
464
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
465
+ "bot_followup": "What used to give you purpose?"
466
+ },
467
+ {
468
+ "user_input": "I feel empty all the time",
469
+ "bot_response": "Emptiness is profound. I'm here with you.",
470
+ "bot_followup": "How long have you felt empty?"
471
+ },
472
+ {
473
+ "user_input": "Life feels meaningless all the time",
474
+ "bot_response": "Existential pain is real. You matter.",
475
+ "bot_followup": "What's changed recently?"
476
+ },
477
+ {
478
+ "user_input": "I have no hope all the time",
479
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
480
+ "bot_followup": "What would hope look like?"
481
+ },
482
+ {
483
+ "user_input": "Everything is pointless all the time",
484
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
485
+ "bot_followup": "What feels most pointless?"
486
+ },
487
+ {
488
+ "user_input": "I'm in despair all the time",
489
+ "bot_response": "Despair is overwhelming. Please don't give up.",
490
+ "bot_followup": "What's causing this despair?"
491
+ },
492
+ {
493
+ "user_input": "I feel defeated all the time",
494
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
495
+ "bot_followup": "What battles are you fighting?"
496
+ },
497
+ {
498
+ "user_input": "Nothing will get better all the time",
499
+ "bot_response": "That permanence feeling is a depression symptom.",
500
+ "bot_followup": "Have you felt this way before?"
501
+ },
502
+ {
503
+ "user_input": "I feel hopeless and I am tired",
504
+ "bot_response": "Hopelessness is heavy. You're not alone.",
505
+ "bot_followup": "What's making you feel this way?"
506
+ },
507
+ {
508
+ "user_input": "Nothing matters anymore and I am tired",
509
+ "bot_response": "When meaning fades, it's deeply painful.",
510
+ "bot_followup": "When did things start feeling meaningless?"
511
+ },
512
+ {
513
+ "user_input": "I see no point and I am tired",
514
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
515
+ "bot_followup": "What used to give you purpose?"
516
+ },
517
+ {
518
+ "user_input": "I feel empty and I am tired",
519
+ "bot_response": "Emptiness is profound. I'm here with you.",
520
+ "bot_followup": "How long have you felt empty?"
521
+ },
522
+ {
523
+ "user_input": "Life feels meaningless and I am tired",
524
+ "bot_response": "Existential pain is real. You matter.",
525
+ "bot_followup": "What's changed recently?"
526
+ },
527
+ {
528
+ "user_input": "I have no hope and I am tired",
529
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
530
+ "bot_followup": "What would hope look like?"
531
+ },
532
+ {
533
+ "user_input": "Everything is pointless and I am tired",
534
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
535
+ "bot_followup": "What feels most pointless?"
536
+ },
537
+ {
538
+ "user_input": "I'm in despair and I am tired",
539
+ "bot_response": "Despair is overwhelming. Please don't give up.",
540
+ "bot_followup": "What's causing this despair?"
541
+ },
542
+ {
543
+ "user_input": "I feel defeated and I am tired",
544
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
545
+ "bot_followup": "What battles are you fighting?"
546
+ },
547
+ {
548
+ "user_input": "Nothing will get better and I am tired",
549
+ "bot_response": "That permanence feeling is a depression symptom.",
550
+ "bot_followup": "Have you felt this way before?"
551
+ },
552
+ {
553
+ "user_input": "I feel hopeless constantly",
554
+ "bot_response": "Hopelessness is heavy. You're not alone.",
555
+ "bot_followup": "What's making you feel this way?"
556
+ },
557
+ {
558
+ "user_input": "Nothing matters anymore constantly",
559
+ "bot_response": "When meaning fades, it's deeply painful.",
560
+ "bot_followup": "When did things start feeling meaningless?"
561
+ },
562
+ {
563
+ "user_input": "I see no point constantly",
564
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
565
+ "bot_followup": "What used to give you purpose?"
566
+ },
567
+ {
568
+ "user_input": "I feel empty constantly",
569
+ "bot_response": "Emptiness is profound. I'm here with you.",
570
+ "bot_followup": "How long have you felt empty?"
571
+ },
572
+ {
573
+ "user_input": "Life feels meaningless constantly",
574
+ "bot_response": "Existential pain is real. You matter.",
575
+ "bot_followup": "What's changed recently?"
576
+ },
577
+ {
578
+ "user_input": "I have no hope constantly",
579
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
580
+ "bot_followup": "What would hope look like?"
581
+ },
582
+ {
583
+ "user_input": "Everything is pointless constantly",
584
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
585
+ "bot_followup": "What feels most pointless?"
586
+ },
587
+ {
588
+ "user_input": "I'm in despair constantly",
589
+ "bot_response": "Despair is overwhelming. Please don't give up.",
590
+ "bot_followup": "What's causing this despair?"
591
+ },
592
+ {
593
+ "user_input": "I feel defeated constantly",
594
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
595
+ "bot_followup": "What battles are you fighting?"
596
+ },
597
+ {
598
+ "user_input": "Nothing will get better constantly",
599
+ "bot_response": "That permanence feeling is a depression symptom.",
600
+ "bot_followup": "Have you felt this way before?"
601
+ },
602
+ {
603
+ "user_input": "I feel hopeless every day",
604
+ "bot_response": "Hopelessness is heavy. You're not alone.",
605
+ "bot_followup": "What's making you feel this way?"
606
+ },
607
+ {
608
+ "user_input": "Nothing matters anymore every day",
609
+ "bot_response": "When meaning fades, it's deeply painful.",
610
+ "bot_followup": "When did things start feeling meaningless?"
611
+ },
612
+ {
613
+ "user_input": "I see no point every day",
614
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
615
+ "bot_followup": "What used to give you purpose?"
616
+ },
617
+ {
618
+ "user_input": "I feel empty every day",
619
+ "bot_response": "Emptiness is profound. I'm here with you.",
620
+ "bot_followup": "How long have you felt empty?"
621
+ },
622
+ {
623
+ "user_input": "Life feels meaningless every day",
624
+ "bot_response": "Existential pain is real. You matter.",
625
+ "bot_followup": "What's changed recently?"
626
+ },
627
+ {
628
+ "user_input": "I have no hope every day",
629
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
630
+ "bot_followup": "What would hope look like?"
631
+ },
632
+ {
633
+ "user_input": "Everything is pointless every day",
634
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
635
+ "bot_followup": "What feels most pointless?"
636
+ },
637
+ {
638
+ "user_input": "I'm in despair every day",
639
+ "bot_response": "Despair is overwhelming. Please don't give up.",
640
+ "bot_followup": "What's causing this despair?"
641
+ },
642
+ {
643
+ "user_input": "I feel defeated every day",
644
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
645
+ "bot_followup": "What battles are you fighting?"
646
+ },
647
+ {
648
+ "user_input": "Nothing will get better every day",
649
+ "bot_response": "That permanence feeling is a depression symptom.",
650
+ "bot_followup": "Have you felt this way before?"
651
+ },
652
+ {
653
+ "user_input": "I feel hopeless all the time",
654
+ "bot_response": "Hopelessness is heavy. You're not alone.",
655
+ "bot_followup": "What's making you feel this way?"
656
+ },
657
+ {
658
+ "user_input": "Nothing matters anymore all the time",
659
+ "bot_response": "When meaning fades, it's deeply painful.",
660
+ "bot_followup": "When did things start feeling meaningless?"
661
+ },
662
+ {
663
+ "user_input": "I see no point all the time",
664
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
665
+ "bot_followup": "What used to give you purpose?"
666
+ },
667
+ {
668
+ "user_input": "I feel empty all the time",
669
+ "bot_response": "Emptiness is profound. I'm here with you.",
670
+ "bot_followup": "How long have you felt empty?"
671
+ },
672
+ {
673
+ "user_input": "Life feels meaningless all the time",
674
+ "bot_response": "Existential pain is real. You matter.",
675
+ "bot_followup": "What's changed recently?"
676
+ },
677
+ {
678
+ "user_input": "I have no hope all the time",
679
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
680
+ "bot_followup": "What would hope look like?"
681
+ },
682
+ {
683
+ "user_input": "Everything is pointless all the time",
684
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
685
+ "bot_followup": "What feels most pointless?"
686
+ },
687
+ {
688
+ "user_input": "I'm in despair all the time",
689
+ "bot_response": "Despair is overwhelming. Please don't give up.",
690
+ "bot_followup": "What's causing this despair?"
691
+ },
692
+ {
693
+ "user_input": "I feel defeated all the time",
694
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
695
+ "bot_followup": "What battles are you fighting?"
696
+ },
697
+ {
698
+ "user_input": "Nothing will get better all the time",
699
+ "bot_response": "That permanence feeling is a depression symptom.",
700
+ "bot_followup": "Have you felt this way before?"
701
+ },
702
+ {
703
+ "user_input": "I feel hopeless and I am tired",
704
+ "bot_response": "Hopelessness is heavy. You're not alone.",
705
+ "bot_followup": "What's making you feel this way?"
706
+ },
707
+ {
708
+ "user_input": "Nothing matters anymore and I am tired",
709
+ "bot_response": "When meaning fades, it's deeply painful.",
710
+ "bot_followup": "When did things start feeling meaningless?"
711
+ },
712
+ {
713
+ "user_input": "I see no point and I am tired",
714
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
715
+ "bot_followup": "What used to give you purpose?"
716
+ },
717
+ {
718
+ "user_input": "I feel empty and I am tired",
719
+ "bot_response": "Emptiness is profound. I'm here with you.",
720
+ "bot_followup": "How long have you felt empty?"
721
+ },
722
+ {
723
+ "user_input": "Life feels meaningless and I am tired",
724
+ "bot_response": "Existential pain is real. You matter.",
725
+ "bot_followup": "What's changed recently?"
726
+ },
727
+ {
728
+ "user_input": "I have no hope and I am tired",
729
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
730
+ "bot_followup": "What would hope look like?"
731
+ },
732
+ {
733
+ "user_input": "Everything is pointless and I am tired",
734
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
735
+ "bot_followup": "What feels most pointless?"
736
+ },
737
+ {
738
+ "user_input": "I'm in despair and I am tired",
739
+ "bot_response": "Despair is overwhelming. Please don't give up.",
740
+ "bot_followup": "What's causing this despair?"
741
+ },
742
+ {
743
+ "user_input": "I feel defeated and I am tired",
744
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
745
+ "bot_followup": "What battles are you fighting?"
746
+ },
747
+ {
748
+ "user_input": "Nothing will get better and I am tired",
749
+ "bot_response": "That permanence feeling is a depression symptom.",
750
+ "bot_followup": "Have you felt this way before?"
751
+ },
752
+ {
753
+ "user_input": "I feel hopeless constantly",
754
+ "bot_response": "Hopelessness is heavy. You're not alone.",
755
+ "bot_followup": "What's making you feel this way?"
756
+ },
757
+ {
758
+ "user_input": "Nothing matters anymore constantly",
759
+ "bot_response": "When meaning fades, it's deeply painful.",
760
+ "bot_followup": "When did things start feeling meaningless?"
761
+ },
762
+ {
763
+ "user_input": "I see no point constantly",
764
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
765
+ "bot_followup": "What used to give you purpose?"
766
+ },
767
+ {
768
+ "user_input": "I feel empty constantly",
769
+ "bot_response": "Emptiness is profound. I'm here with you.",
770
+ "bot_followup": "How long have you felt empty?"
771
+ },
772
+ {
773
+ "user_input": "Life feels meaningless constantly",
774
+ "bot_response": "Existential pain is real. You matter.",
775
+ "bot_followup": "What's changed recently?"
776
+ },
777
+ {
778
+ "user_input": "I have no hope constantly",
779
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
780
+ "bot_followup": "What would hope look like?"
781
+ },
782
+ {
783
+ "user_input": "Everything is pointless constantly",
784
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
785
+ "bot_followup": "What feels most pointless?"
786
+ },
787
+ {
788
+ "user_input": "I'm in despair constantly",
789
+ "bot_response": "Despair is overwhelming. Please don't give up.",
790
+ "bot_followup": "What's causing this despair?"
791
+ },
792
+ {
793
+ "user_input": "I feel defeated constantly",
794
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
795
+ "bot_followup": "What battles are you fighting?"
796
+ },
797
+ {
798
+ "user_input": "Nothing will get better constantly",
799
+ "bot_response": "That permanence feeling is a depression symptom.",
800
+ "bot_followup": "Have you felt this way before?"
801
+ },
802
+ {
803
+ "user_input": "I feel hopeless every day",
804
+ "bot_response": "Hopelessness is heavy. You're not alone.",
805
+ "bot_followup": "What's making you feel this way?"
806
+ },
807
+ {
808
+ "user_input": "Nothing matters anymore every day",
809
+ "bot_response": "When meaning fades, it's deeply painful.",
810
+ "bot_followup": "When did things start feeling meaningless?"
811
+ },
812
+ {
813
+ "user_input": "I see no point every day",
814
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
815
+ "bot_followup": "What used to give you purpose?"
816
+ },
817
+ {
818
+ "user_input": "I feel empty every day",
819
+ "bot_response": "Emptiness is profound. I'm here with you.",
820
+ "bot_followup": "How long have you felt empty?"
821
+ },
822
+ {
823
+ "user_input": "Life feels meaningless every day",
824
+ "bot_response": "Existential pain is real. You matter.",
825
+ "bot_followup": "What's changed recently?"
826
+ },
827
+ {
828
+ "user_input": "I have no hope every day",
829
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
830
+ "bot_followup": "What would hope look like?"
831
+ },
832
+ {
833
+ "user_input": "Everything is pointless every day",
834
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
835
+ "bot_followup": "What feels most pointless?"
836
+ },
837
+ {
838
+ "user_input": "I'm in despair every day",
839
+ "bot_response": "Despair is overwhelming. Please don't give up.",
840
+ "bot_followup": "What's causing this despair?"
841
+ },
842
+ {
843
+ "user_input": "I feel defeated every day",
844
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
845
+ "bot_followup": "What battles are you fighting?"
846
+ },
847
+ {
848
+ "user_input": "Nothing will get better every day",
849
+ "bot_response": "That permanence feeling is a depression symptom.",
850
+ "bot_followup": "Have you felt this way before?"
851
+ },
852
+ {
853
+ "user_input": "I feel hopeless all the time",
854
+ "bot_response": "Hopelessness is heavy. You're not alone.",
855
+ "bot_followup": "What's making you feel this way?"
856
+ },
857
+ {
858
+ "user_input": "Nothing matters anymore all the time",
859
+ "bot_response": "When meaning fades, it's deeply painful.",
860
+ "bot_followup": "When did things start feeling meaningless?"
861
+ },
862
+ {
863
+ "user_input": "I see no point all the time",
864
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
865
+ "bot_followup": "What used to give you purpose?"
866
+ },
867
+ {
868
+ "user_input": "I feel empty all the time",
869
+ "bot_response": "Emptiness is profound. I'm here with you.",
870
+ "bot_followup": "How long have you felt empty?"
871
+ },
872
+ {
873
+ "user_input": "Life feels meaningless all the time",
874
+ "bot_response": "Existential pain is real. You matter.",
875
+ "bot_followup": "What's changed recently?"
876
+ },
877
+ {
878
+ "user_input": "I have no hope all the time",
879
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
880
+ "bot_followup": "What would hope look like?"
881
+ },
882
+ {
883
+ "user_input": "Everything is pointless all the time",
884
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
885
+ "bot_followup": "What feels most pointless?"
886
+ },
887
+ {
888
+ "user_input": "I'm in despair all the time",
889
+ "bot_response": "Despair is overwhelming. Please don't give up.",
890
+ "bot_followup": "What's causing this despair?"
891
+ },
892
+ {
893
+ "user_input": "I feel defeated all the time",
894
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
895
+ "bot_followup": "What battles are you fighting?"
896
+ },
897
+ {
898
+ "user_input": "Nothing will get better all the time",
899
+ "bot_response": "That permanence feeling is a depression symptom.",
900
+ "bot_followup": "Have you felt this way before?"
901
+ },
902
+ {
903
+ "user_input": "I feel hopeless and I am tired",
904
+ "bot_response": "Hopelessness is heavy. You're not alone.",
905
+ "bot_followup": "What's making you feel this way?"
906
+ },
907
+ {
908
+ "user_input": "Nothing matters anymore and I am tired",
909
+ "bot_response": "When meaning fades, it's deeply painful.",
910
+ "bot_followup": "When did things start feeling meaningless?"
911
+ },
912
+ {
913
+ "user_input": "I see no point and I am tired",
914
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
915
+ "bot_followup": "What used to give you purpose?"
916
+ },
917
+ {
918
+ "user_input": "I feel empty and I am tired",
919
+ "bot_response": "Emptiness is profound. I'm here with you.",
920
+ "bot_followup": "How long have you felt empty?"
921
+ },
922
+ {
923
+ "user_input": "Life feels meaningless and I am tired",
924
+ "bot_response": "Existential pain is real. You matter.",
925
+ "bot_followup": "What's changed recently?"
926
+ },
927
+ {
928
+ "user_input": "I have no hope and I am tired",
929
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
930
+ "bot_followup": "What would hope look like?"
931
+ },
932
+ {
933
+ "user_input": "Everything is pointless and I am tired",
934
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
935
+ "bot_followup": "What feels most pointless?"
936
+ },
937
+ {
938
+ "user_input": "I'm in despair and I am tired",
939
+ "bot_response": "Despair is overwhelming. Please don't give up.",
940
+ "bot_followup": "What's causing this despair?"
941
+ },
942
+ {
943
+ "user_input": "I feel defeated and I am tired",
944
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
945
+ "bot_followup": "What battles are you fighting?"
946
+ },
947
+ {
948
+ "user_input": "Nothing will get better and I am tired",
949
+ "bot_response": "That permanence feeling is a depression symptom.",
950
+ "bot_followup": "Have you felt this way before?"
951
+ },
952
+ {
953
+ "user_input": "I feel hopeless constantly",
954
+ "bot_response": "Hopelessness is heavy. You're not alone.",
955
+ "bot_followup": "What's making you feel this way?"
956
+ },
957
+ {
958
+ "user_input": "Nothing matters anymore constantly",
959
+ "bot_response": "When meaning fades, it's deeply painful.",
960
+ "bot_followup": "When did things start feeling meaningless?"
961
+ },
962
+ {
963
+ "user_input": "I see no point constantly",
964
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
965
+ "bot_followup": "What used to give you purpose?"
966
+ },
967
+ {
968
+ "user_input": "I feel empty constantly",
969
+ "bot_response": "Emptiness is profound. I'm here with you.",
970
+ "bot_followup": "How long have you felt empty?"
971
+ },
972
+ {
973
+ "user_input": "Life feels meaningless constantly",
974
+ "bot_response": "Existential pain is real. You matter.",
975
+ "bot_followup": "What's changed recently?"
976
+ },
977
+ {
978
+ "user_input": "I have no hope constantly",
979
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
980
+ "bot_followup": "What would hope look like?"
981
+ },
982
+ {
983
+ "user_input": "Everything is pointless constantly",
984
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
985
+ "bot_followup": "What feels most pointless?"
986
+ },
987
+ {
988
+ "user_input": "I'm in despair constantly",
989
+ "bot_response": "Despair is overwhelming. Please don't give up.",
990
+ "bot_followup": "What's causing this despair?"
991
+ },
992
+ {
993
+ "user_input": "I feel defeated constantly",
994
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
995
+ "bot_followup": "What battles are you fighting?"
996
+ },
997
+ {
998
+ "user_input": "Nothing will get better constantly",
999
+ "bot_response": "That permanence feeling is a depression symptom.",
1000
+ "bot_followup": "Have you felt this way before?"
1001
+ },
1002
+ {
1003
+ "user_input": "I feel hopeless every day",
1004
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1005
+ "bot_followup": "What's making you feel this way?"
1006
+ },
1007
+ {
1008
+ "user_input": "Nothing matters anymore every day",
1009
+ "bot_response": "When meaning fades, it's deeply painful.",
1010
+ "bot_followup": "When did things start feeling meaningless?"
1011
+ },
1012
+ {
1013
+ "user_input": "I see no point every day",
1014
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1015
+ "bot_followup": "What used to give you purpose?"
1016
+ },
1017
+ {
1018
+ "user_input": "I feel empty every day",
1019
+ "bot_response": "Emptiness is profound. I'm here with you.",
1020
+ "bot_followup": "How long have you felt empty?"
1021
+ },
1022
+ {
1023
+ "user_input": "Life feels meaningless every day",
1024
+ "bot_response": "Existential pain is real. You matter.",
1025
+ "bot_followup": "What's changed recently?"
1026
+ },
1027
+ {
1028
+ "user_input": "I have no hope every day",
1029
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1030
+ "bot_followup": "What would hope look like?"
1031
+ },
1032
+ {
1033
+ "user_input": "Everything is pointless every day",
1034
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1035
+ "bot_followup": "What feels most pointless?"
1036
+ },
1037
+ {
1038
+ "user_input": "I'm in despair every day",
1039
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1040
+ "bot_followup": "What's causing this despair?"
1041
+ },
1042
+ {
1043
+ "user_input": "I feel defeated every day",
1044
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1045
+ "bot_followup": "What battles are you fighting?"
1046
+ },
1047
+ {
1048
+ "user_input": "Nothing will get better every day",
1049
+ "bot_response": "That permanence feeling is a depression symptom.",
1050
+ "bot_followup": "Have you felt this way before?"
1051
+ },
1052
+ {
1053
+ "user_input": "I feel hopeless all the time",
1054
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1055
+ "bot_followup": "What's making you feel this way?"
1056
+ },
1057
+ {
1058
+ "user_input": "Nothing matters anymore all the time",
1059
+ "bot_response": "When meaning fades, it's deeply painful.",
1060
+ "bot_followup": "When did things start feeling meaningless?"
1061
+ },
1062
+ {
1063
+ "user_input": "I see no point all the time",
1064
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1065
+ "bot_followup": "What used to give you purpose?"
1066
+ },
1067
+ {
1068
+ "user_input": "I feel empty all the time",
1069
+ "bot_response": "Emptiness is profound. I'm here with you.",
1070
+ "bot_followup": "How long have you felt empty?"
1071
+ },
1072
+ {
1073
+ "user_input": "Life feels meaningless all the time",
1074
+ "bot_response": "Existential pain is real. You matter.",
1075
+ "bot_followup": "What's changed recently?"
1076
+ },
1077
+ {
1078
+ "user_input": "I have no hope all the time",
1079
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1080
+ "bot_followup": "What would hope look like?"
1081
+ },
1082
+ {
1083
+ "user_input": "Everything is pointless all the time",
1084
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1085
+ "bot_followup": "What feels most pointless?"
1086
+ },
1087
+ {
1088
+ "user_input": "I'm in despair all the time",
1089
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1090
+ "bot_followup": "What's causing this despair?"
1091
+ },
1092
+ {
1093
+ "user_input": "I feel defeated all the time",
1094
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1095
+ "bot_followup": "What battles are you fighting?"
1096
+ },
1097
+ {
1098
+ "user_input": "Nothing will get better all the time",
1099
+ "bot_response": "That permanence feeling is a depression symptom.",
1100
+ "bot_followup": "Have you felt this way before?"
1101
+ },
1102
+ {
1103
+ "user_input": "I feel hopeless and I am tired",
1104
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1105
+ "bot_followup": "What's making you feel this way?"
1106
+ },
1107
+ {
1108
+ "user_input": "Nothing matters anymore and I am tired",
1109
+ "bot_response": "When meaning fades, it's deeply painful.",
1110
+ "bot_followup": "When did things start feeling meaningless?"
1111
+ },
1112
+ {
1113
+ "user_input": "I see no point and I am tired",
1114
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1115
+ "bot_followup": "What used to give you purpose?"
1116
+ },
1117
+ {
1118
+ "user_input": "I feel empty and I am tired",
1119
+ "bot_response": "Emptiness is profound. I'm here with you.",
1120
+ "bot_followup": "How long have you felt empty?"
1121
+ },
1122
+ {
1123
+ "user_input": "Life feels meaningless and I am tired",
1124
+ "bot_response": "Existential pain is real. You matter.",
1125
+ "bot_followup": "What's changed recently?"
1126
+ },
1127
+ {
1128
+ "user_input": "I have no hope and I am tired",
1129
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1130
+ "bot_followup": "What would hope look like?"
1131
+ },
1132
+ {
1133
+ "user_input": "Everything is pointless and I am tired",
1134
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1135
+ "bot_followup": "What feels most pointless?"
1136
+ },
1137
+ {
1138
+ "user_input": "I'm in despair and I am tired",
1139
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1140
+ "bot_followup": "What's causing this despair?"
1141
+ },
1142
+ {
1143
+ "user_input": "I feel defeated and I am tired",
1144
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1145
+ "bot_followup": "What battles are you fighting?"
1146
+ },
1147
+ {
1148
+ "user_input": "Nothing will get better and I am tired",
1149
+ "bot_response": "That permanence feeling is a depression symptom.",
1150
+ "bot_followup": "Have you felt this way before?"
1151
+ },
1152
+ {
1153
+ "user_input": "I feel hopeless constantly",
1154
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1155
+ "bot_followup": "What's making you feel this way?"
1156
+ },
1157
+ {
1158
+ "user_input": "Nothing matters anymore constantly",
1159
+ "bot_response": "When meaning fades, it's deeply painful.",
1160
+ "bot_followup": "When did things start feeling meaningless?"
1161
+ },
1162
+ {
1163
+ "user_input": "I see no point constantly",
1164
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1165
+ "bot_followup": "What used to give you purpose?"
1166
+ },
1167
+ {
1168
+ "user_input": "I feel empty constantly",
1169
+ "bot_response": "Emptiness is profound. I'm here with you.",
1170
+ "bot_followup": "How long have you felt empty?"
1171
+ },
1172
+ {
1173
+ "user_input": "Life feels meaningless constantly",
1174
+ "bot_response": "Existential pain is real. You matter.",
1175
+ "bot_followup": "What's changed recently?"
1176
+ },
1177
+ {
1178
+ "user_input": "I have no hope constantly",
1179
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1180
+ "bot_followup": "What would hope look like?"
1181
+ },
1182
+ {
1183
+ "user_input": "Everything is pointless constantly",
1184
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1185
+ "bot_followup": "What feels most pointless?"
1186
+ },
1187
+ {
1188
+ "user_input": "I'm in despair constantly",
1189
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1190
+ "bot_followup": "What's causing this despair?"
1191
+ },
1192
+ {
1193
+ "user_input": "I feel defeated constantly",
1194
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1195
+ "bot_followup": "What battles are you fighting?"
1196
+ },
1197
+ {
1198
+ "user_input": "Nothing will get better constantly",
1199
+ "bot_response": "That permanence feeling is a depression symptom.",
1200
+ "bot_followup": "Have you felt this way before?"
1201
+ },
1202
+ {
1203
+ "user_input": "I feel hopeless every day",
1204
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1205
+ "bot_followup": "What's making you feel this way?"
1206
+ },
1207
+ {
1208
+ "user_input": "Nothing matters anymore every day",
1209
+ "bot_response": "When meaning fades, it's deeply painful.",
1210
+ "bot_followup": "When did things start feeling meaningless?"
1211
+ },
1212
+ {
1213
+ "user_input": "I see no point every day",
1214
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1215
+ "bot_followup": "What used to give you purpose?"
1216
+ },
1217
+ {
1218
+ "user_input": "I feel empty every day",
1219
+ "bot_response": "Emptiness is profound. I'm here with you.",
1220
+ "bot_followup": "How long have you felt empty?"
1221
+ },
1222
+ {
1223
+ "user_input": "Life feels meaningless every day",
1224
+ "bot_response": "Existential pain is real. You matter.",
1225
+ "bot_followup": "What's changed recently?"
1226
+ },
1227
+ {
1228
+ "user_input": "I have no hope every day",
1229
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1230
+ "bot_followup": "What would hope look like?"
1231
+ },
1232
+ {
1233
+ "user_input": "Everything is pointless every day",
1234
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1235
+ "bot_followup": "What feels most pointless?"
1236
+ },
1237
+ {
1238
+ "user_input": "I'm in despair every day",
1239
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1240
+ "bot_followup": "What's causing this despair?"
1241
+ },
1242
+ {
1243
+ "user_input": "I feel defeated every day",
1244
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1245
+ "bot_followup": "What battles are you fighting?"
1246
+ },
1247
+ {
1248
+ "user_input": "Nothing will get better every day",
1249
+ "bot_response": "That permanence feeling is a depression symptom.",
1250
+ "bot_followup": "Have you felt this way before?"
1251
+ },
1252
+ {
1253
+ "user_input": "I feel hopeless all the time",
1254
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1255
+ "bot_followup": "What's making you feel this way?"
1256
+ },
1257
+ {
1258
+ "user_input": "Nothing matters anymore all the time",
1259
+ "bot_response": "When meaning fades, it's deeply painful.",
1260
+ "bot_followup": "When did things start feeling meaningless?"
1261
+ },
1262
+ {
1263
+ "user_input": "I see no point all the time",
1264
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1265
+ "bot_followup": "What used to give you purpose?"
1266
+ },
1267
+ {
1268
+ "user_input": "I feel empty all the time",
1269
+ "bot_response": "Emptiness is profound. I'm here with you.",
1270
+ "bot_followup": "How long have you felt empty?"
1271
+ },
1272
+ {
1273
+ "user_input": "Life feels meaningless all the time",
1274
+ "bot_response": "Existential pain is real. You matter.",
1275
+ "bot_followup": "What's changed recently?"
1276
+ },
1277
+ {
1278
+ "user_input": "I have no hope all the time",
1279
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1280
+ "bot_followup": "What would hope look like?"
1281
+ },
1282
+ {
1283
+ "user_input": "Everything is pointless all the time",
1284
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1285
+ "bot_followup": "What feels most pointless?"
1286
+ },
1287
+ {
1288
+ "user_input": "I'm in despair all the time",
1289
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1290
+ "bot_followup": "What's causing this despair?"
1291
+ },
1292
+ {
1293
+ "user_input": "I feel defeated all the time",
1294
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1295
+ "bot_followup": "What battles are you fighting?"
1296
+ },
1297
+ {
1298
+ "user_input": "Nothing will get better all the time",
1299
+ "bot_response": "That permanence feeling is a depression symptom.",
1300
+ "bot_followup": "Have you felt this way before?"
1301
+ },
1302
+ {
1303
+ "user_input": "I feel hopeless and I am tired",
1304
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1305
+ "bot_followup": "What's making you feel this way?"
1306
+ },
1307
+ {
1308
+ "user_input": "Nothing matters anymore and I am tired",
1309
+ "bot_response": "When meaning fades, it's deeply painful.",
1310
+ "bot_followup": "When did things start feeling meaningless?"
1311
+ },
1312
+ {
1313
+ "user_input": "I see no point and I am tired",
1314
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1315
+ "bot_followup": "What used to give you purpose?"
1316
+ },
1317
+ {
1318
+ "user_input": "I feel empty and I am tired",
1319
+ "bot_response": "Emptiness is profound. I'm here with you.",
1320
+ "bot_followup": "How long have you felt empty?"
1321
+ },
1322
+ {
1323
+ "user_input": "Life feels meaningless and I am tired",
1324
+ "bot_response": "Existential pain is real. You matter.",
1325
+ "bot_followup": "What's changed recently?"
1326
+ },
1327
+ {
1328
+ "user_input": "I have no hope and I am tired",
1329
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1330
+ "bot_followup": "What would hope look like?"
1331
+ },
1332
+ {
1333
+ "user_input": "Everything is pointless and I am tired",
1334
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1335
+ "bot_followup": "What feels most pointless?"
1336
+ },
1337
+ {
1338
+ "user_input": "I'm in despair and I am tired",
1339
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1340
+ "bot_followup": "What's causing this despair?"
1341
+ },
1342
+ {
1343
+ "user_input": "I feel defeated and I am tired",
1344
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1345
+ "bot_followup": "What battles are you fighting?"
1346
+ },
1347
+ {
1348
+ "user_input": "Nothing will get better and I am tired",
1349
+ "bot_response": "That permanence feeling is a depression symptom.",
1350
+ "bot_followup": "Have you felt this way before?"
1351
+ },
1352
+ {
1353
+ "user_input": "I feel hopeless constantly",
1354
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1355
+ "bot_followup": "What's making you feel this way?"
1356
+ },
1357
+ {
1358
+ "user_input": "Nothing matters anymore constantly",
1359
+ "bot_response": "When meaning fades, it's deeply painful.",
1360
+ "bot_followup": "When did things start feeling meaningless?"
1361
+ },
1362
+ {
1363
+ "user_input": "I see no point constantly",
1364
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1365
+ "bot_followup": "What used to give you purpose?"
1366
+ },
1367
+ {
1368
+ "user_input": "I feel empty constantly",
1369
+ "bot_response": "Emptiness is profound. I'm here with you.",
1370
+ "bot_followup": "How long have you felt empty?"
1371
+ },
1372
+ {
1373
+ "user_input": "Life feels meaningless constantly",
1374
+ "bot_response": "Existential pain is real. You matter.",
1375
+ "bot_followup": "What's changed recently?"
1376
+ },
1377
+ {
1378
+ "user_input": "I have no hope constantly",
1379
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1380
+ "bot_followup": "What would hope look like?"
1381
+ },
1382
+ {
1383
+ "user_input": "Everything is pointless constantly",
1384
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1385
+ "bot_followup": "What feels most pointless?"
1386
+ },
1387
+ {
1388
+ "user_input": "I'm in despair constantly",
1389
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1390
+ "bot_followup": "What's causing this despair?"
1391
+ },
1392
+ {
1393
+ "user_input": "I feel defeated constantly",
1394
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1395
+ "bot_followup": "What battles are you fighting?"
1396
+ },
1397
+ {
1398
+ "user_input": "Nothing will get better constantly",
1399
+ "bot_response": "That permanence feeling is a depression symptom.",
1400
+ "bot_followup": "Have you felt this way before?"
1401
+ },
1402
+ {
1403
+ "user_input": "I feel hopeless every day",
1404
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1405
+ "bot_followup": "What's making you feel this way?"
1406
+ },
1407
+ {
1408
+ "user_input": "Nothing matters anymore every day",
1409
+ "bot_response": "When meaning fades, it's deeply painful.",
1410
+ "bot_followup": "When did things start feeling meaningless?"
1411
+ },
1412
+ {
1413
+ "user_input": "I see no point every day",
1414
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1415
+ "bot_followup": "What used to give you purpose?"
1416
+ },
1417
+ {
1418
+ "user_input": "I feel empty every day",
1419
+ "bot_response": "Emptiness is profound. I'm here with you.",
1420
+ "bot_followup": "How long have you felt empty?"
1421
+ },
1422
+ {
1423
+ "user_input": "Life feels meaningless every day",
1424
+ "bot_response": "Existential pain is real. You matter.",
1425
+ "bot_followup": "What's changed recently?"
1426
+ },
1427
+ {
1428
+ "user_input": "I have no hope every day",
1429
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1430
+ "bot_followup": "What would hope look like?"
1431
+ },
1432
+ {
1433
+ "user_input": "Everything is pointless every day",
1434
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1435
+ "bot_followup": "What feels most pointless?"
1436
+ },
1437
+ {
1438
+ "user_input": "I'm in despair every day",
1439
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1440
+ "bot_followup": "What's causing this despair?"
1441
+ },
1442
+ {
1443
+ "user_input": "I feel defeated every day",
1444
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1445
+ "bot_followup": "What battles are you fighting?"
1446
+ },
1447
+ {
1448
+ "user_input": "Nothing will get better every day",
1449
+ "bot_response": "That permanence feeling is a depression symptom.",
1450
+ "bot_followup": "Have you felt this way before?"
1451
+ },
1452
+ {
1453
+ "user_input": "I feel hopeless all the time",
1454
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1455
+ "bot_followup": "What's making you feel this way?"
1456
+ },
1457
+ {
1458
+ "user_input": "Nothing matters anymore all the time",
1459
+ "bot_response": "When meaning fades, it's deeply painful.",
1460
+ "bot_followup": "When did things start feeling meaningless?"
1461
+ },
1462
+ {
1463
+ "user_input": "I see no point all the time",
1464
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1465
+ "bot_followup": "What used to give you purpose?"
1466
+ },
1467
+ {
1468
+ "user_input": "I feel empty all the time",
1469
+ "bot_response": "Emptiness is profound. I'm here with you.",
1470
+ "bot_followup": "How long have you felt empty?"
1471
+ },
1472
+ {
1473
+ "user_input": "Life feels meaningless all the time",
1474
+ "bot_response": "Existential pain is real. You matter.",
1475
+ "bot_followup": "What's changed recently?"
1476
+ },
1477
+ {
1478
+ "user_input": "I have no hope all the time",
1479
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1480
+ "bot_followup": "What would hope look like?"
1481
+ },
1482
+ {
1483
+ "user_input": "Everything is pointless all the time",
1484
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1485
+ "bot_followup": "What feels most pointless?"
1486
+ },
1487
+ {
1488
+ "user_input": "I'm in despair all the time",
1489
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1490
+ "bot_followup": "What's causing this despair?"
1491
+ },
1492
+ {
1493
+ "user_input": "I feel defeated all the time",
1494
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1495
+ "bot_followup": "What battles are you fighting?"
1496
+ },
1497
+ {
1498
+ "user_input": "Nothing will get better all the time",
1499
+ "bot_response": "That permanence feeling is a depression symptom.",
1500
+ "bot_followup": "Have you felt this way before?"
1501
+ },
1502
+ {
1503
+ "user_input": "I feel hopeless and I am tired",
1504
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1505
+ "bot_followup": "What's making you feel this way?"
1506
+ },
1507
+ {
1508
+ "user_input": "Nothing matters anymore and I am tired",
1509
+ "bot_response": "When meaning fades, it's deeply painful.",
1510
+ "bot_followup": "When did things start feeling meaningless?"
1511
+ },
1512
+ {
1513
+ "user_input": "I see no point and I am tired",
1514
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1515
+ "bot_followup": "What used to give you purpose?"
1516
+ },
1517
+ {
1518
+ "user_input": "I feel empty and I am tired",
1519
+ "bot_response": "Emptiness is profound. I'm here with you.",
1520
+ "bot_followup": "How long have you felt empty?"
1521
+ },
1522
+ {
1523
+ "user_input": "Life feels meaningless and I am tired",
1524
+ "bot_response": "Existential pain is real. You matter.",
1525
+ "bot_followup": "What's changed recently?"
1526
+ },
1527
+ {
1528
+ "user_input": "I have no hope and I am tired",
1529
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1530
+ "bot_followup": "What would hope look like?"
1531
+ },
1532
+ {
1533
+ "user_input": "Everything is pointless and I am tired",
1534
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1535
+ "bot_followup": "What feels most pointless?"
1536
+ },
1537
+ {
1538
+ "user_input": "I'm in despair and I am tired",
1539
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1540
+ "bot_followup": "What's causing this despair?"
1541
+ },
1542
+ {
1543
+ "user_input": "I feel defeated and I am tired",
1544
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1545
+ "bot_followup": "What battles are you fighting?"
1546
+ },
1547
+ {
1548
+ "user_input": "Nothing will get better and I am tired",
1549
+ "bot_response": "That permanence feeling is a depression symptom.",
1550
+ "bot_followup": "Have you felt this way before?"
1551
+ },
1552
+ {
1553
+ "user_input": "I feel hopeless constantly",
1554
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1555
+ "bot_followup": "What's making you feel this way?"
1556
+ },
1557
+ {
1558
+ "user_input": "Nothing matters anymore constantly",
1559
+ "bot_response": "When meaning fades, it's deeply painful.",
1560
+ "bot_followup": "When did things start feeling meaningless?"
1561
+ },
1562
+ {
1563
+ "user_input": "I see no point constantly",
1564
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1565
+ "bot_followup": "What used to give you purpose?"
1566
+ },
1567
+ {
1568
+ "user_input": "I feel empty constantly",
1569
+ "bot_response": "Emptiness is profound. I'm here with you.",
1570
+ "bot_followup": "How long have you felt empty?"
1571
+ },
1572
+ {
1573
+ "user_input": "Life feels meaningless constantly",
1574
+ "bot_response": "Existential pain is real. You matter.",
1575
+ "bot_followup": "What's changed recently?"
1576
+ },
1577
+ {
1578
+ "user_input": "I have no hope constantly",
1579
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1580
+ "bot_followup": "What would hope look like?"
1581
+ },
1582
+ {
1583
+ "user_input": "Everything is pointless constantly",
1584
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1585
+ "bot_followup": "What feels most pointless?"
1586
+ },
1587
+ {
1588
+ "user_input": "I'm in despair constantly",
1589
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1590
+ "bot_followup": "What's causing this despair?"
1591
+ },
1592
+ {
1593
+ "user_input": "I feel defeated constantly",
1594
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1595
+ "bot_followup": "What battles are you fighting?"
1596
+ },
1597
+ {
1598
+ "user_input": "Nothing will get better constantly",
1599
+ "bot_response": "That permanence feeling is a depression symptom.",
1600
+ "bot_followup": "Have you felt this way before?"
1601
+ },
1602
+ {
1603
+ "user_input": "I feel hopeless every day",
1604
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1605
+ "bot_followup": "What's making you feel this way?"
1606
+ },
1607
+ {
1608
+ "user_input": "Nothing matters anymore every day",
1609
+ "bot_response": "When meaning fades, it's deeply painful.",
1610
+ "bot_followup": "When did things start feeling meaningless?"
1611
+ },
1612
+ {
1613
+ "user_input": "I see no point every day",
1614
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1615
+ "bot_followup": "What used to give you purpose?"
1616
+ },
1617
+ {
1618
+ "user_input": "I feel empty every day",
1619
+ "bot_response": "Emptiness is profound. I'm here with you.",
1620
+ "bot_followup": "How long have you felt empty?"
1621
+ },
1622
+ {
1623
+ "user_input": "Life feels meaningless every day",
1624
+ "bot_response": "Existential pain is real. You matter.",
1625
+ "bot_followup": "What's changed recently?"
1626
+ },
1627
+ {
1628
+ "user_input": "I have no hope every day",
1629
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1630
+ "bot_followup": "What would hope look like?"
1631
+ },
1632
+ {
1633
+ "user_input": "Everything is pointless every day",
1634
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1635
+ "bot_followup": "What feels most pointless?"
1636
+ },
1637
+ {
1638
+ "user_input": "I'm in despair every day",
1639
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1640
+ "bot_followup": "What's causing this despair?"
1641
+ },
1642
+ {
1643
+ "user_input": "I feel defeated every day",
1644
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1645
+ "bot_followup": "What battles are you fighting?"
1646
+ },
1647
+ {
1648
+ "user_input": "Nothing will get better every day",
1649
+ "bot_response": "That permanence feeling is a depression symptom.",
1650
+ "bot_followup": "Have you felt this way before?"
1651
+ },
1652
+ {
1653
+ "user_input": "I feel hopeless all the time",
1654
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1655
+ "bot_followup": "What's making you feel this way?"
1656
+ },
1657
+ {
1658
+ "user_input": "Nothing matters anymore all the time",
1659
+ "bot_response": "When meaning fades, it's deeply painful.",
1660
+ "bot_followup": "When did things start feeling meaningless?"
1661
+ },
1662
+ {
1663
+ "user_input": "I see no point all the time",
1664
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1665
+ "bot_followup": "What used to give you purpose?"
1666
+ },
1667
+ {
1668
+ "user_input": "I feel empty all the time",
1669
+ "bot_response": "Emptiness is profound. I'm here with you.",
1670
+ "bot_followup": "How long have you felt empty?"
1671
+ },
1672
+ {
1673
+ "user_input": "Life feels meaningless all the time",
1674
+ "bot_response": "Existential pain is real. You matter.",
1675
+ "bot_followup": "What's changed recently?"
1676
+ },
1677
+ {
1678
+ "user_input": "I have no hope all the time",
1679
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1680
+ "bot_followup": "What would hope look like?"
1681
+ },
1682
+ {
1683
+ "user_input": "Everything is pointless all the time",
1684
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1685
+ "bot_followup": "What feels most pointless?"
1686
+ },
1687
+ {
1688
+ "user_input": "I'm in despair all the time",
1689
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1690
+ "bot_followup": "What's causing this despair?"
1691
+ },
1692
+ {
1693
+ "user_input": "I feel defeated all the time",
1694
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1695
+ "bot_followup": "What battles are you fighting?"
1696
+ },
1697
+ {
1698
+ "user_input": "Nothing will get better all the time",
1699
+ "bot_response": "That permanence feeling is a depression symptom.",
1700
+ "bot_followup": "Have you felt this way before?"
1701
+ },
1702
+ {
1703
+ "user_input": "I feel hopeless and I am tired",
1704
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1705
+ "bot_followup": "What's making you feel this way?"
1706
+ },
1707
+ {
1708
+ "user_input": "Nothing matters anymore and I am tired",
1709
+ "bot_response": "When meaning fades, it's deeply painful.",
1710
+ "bot_followup": "When did things start feeling meaningless?"
1711
+ },
1712
+ {
1713
+ "user_input": "I see no point and I am tired",
1714
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1715
+ "bot_followup": "What used to give you purpose?"
1716
+ },
1717
+ {
1718
+ "user_input": "I feel empty and I am tired",
1719
+ "bot_response": "Emptiness is profound. I'm here with you.",
1720
+ "bot_followup": "How long have you felt empty?"
1721
+ },
1722
+ {
1723
+ "user_input": "Life feels meaningless and I am tired",
1724
+ "bot_response": "Existential pain is real. You matter.",
1725
+ "bot_followup": "What's changed recently?"
1726
+ },
1727
+ {
1728
+ "user_input": "I have no hope and I am tired",
1729
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1730
+ "bot_followup": "What would hope look like?"
1731
+ },
1732
+ {
1733
+ "user_input": "Everything is pointless and I am tired",
1734
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1735
+ "bot_followup": "What feels most pointless?"
1736
+ },
1737
+ {
1738
+ "user_input": "I'm in despair and I am tired",
1739
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1740
+ "bot_followup": "What's causing this despair?"
1741
+ },
1742
+ {
1743
+ "user_input": "I feel defeated and I am tired",
1744
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1745
+ "bot_followup": "What battles are you fighting?"
1746
+ },
1747
+ {
1748
+ "user_input": "Nothing will get better and I am tired",
1749
+ "bot_response": "That permanence feeling is a depression symptom.",
1750
+ "bot_followup": "Have you felt this way before?"
1751
+ },
1752
+ {
1753
+ "user_input": "I feel hopeless constantly",
1754
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1755
+ "bot_followup": "What's making you feel this way?"
1756
+ },
1757
+ {
1758
+ "user_input": "Nothing matters anymore constantly",
1759
+ "bot_response": "When meaning fades, it's deeply painful.",
1760
+ "bot_followup": "When did things start feeling meaningless?"
1761
+ },
1762
+ {
1763
+ "user_input": "I see no point constantly",
1764
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1765
+ "bot_followup": "What used to give you purpose?"
1766
+ },
1767
+ {
1768
+ "user_input": "I feel empty constantly",
1769
+ "bot_response": "Emptiness is profound. I'm here with you.",
1770
+ "bot_followup": "How long have you felt empty?"
1771
+ },
1772
+ {
1773
+ "user_input": "Life feels meaningless constantly",
1774
+ "bot_response": "Existential pain is real. You matter.",
1775
+ "bot_followup": "What's changed recently?"
1776
+ },
1777
+ {
1778
+ "user_input": "I have no hope constantly",
1779
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1780
+ "bot_followup": "What would hope look like?"
1781
+ },
1782
+ {
1783
+ "user_input": "Everything is pointless constantly",
1784
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1785
+ "bot_followup": "What feels most pointless?"
1786
+ },
1787
+ {
1788
+ "user_input": "I'm in despair constantly",
1789
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1790
+ "bot_followup": "What's causing this despair?"
1791
+ },
1792
+ {
1793
+ "user_input": "I feel defeated constantly",
1794
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1795
+ "bot_followup": "What battles are you fighting?"
1796
+ },
1797
+ {
1798
+ "user_input": "Nothing will get better constantly",
1799
+ "bot_response": "That permanence feeling is a depression symptom.",
1800
+ "bot_followup": "Have you felt this way before?"
1801
+ },
1802
+ {
1803
+ "user_input": "I feel hopeless every day",
1804
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1805
+ "bot_followup": "What's making you feel this way?"
1806
+ },
1807
+ {
1808
+ "user_input": "Nothing matters anymore every day",
1809
+ "bot_response": "When meaning fades, it's deeply painful.",
1810
+ "bot_followup": "When did things start feeling meaningless?"
1811
+ },
1812
+ {
1813
+ "user_input": "I see no point every day",
1814
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1815
+ "bot_followup": "What used to give you purpose?"
1816
+ },
1817
+ {
1818
+ "user_input": "I feel empty every day",
1819
+ "bot_response": "Emptiness is profound. I'm here with you.",
1820
+ "bot_followup": "How long have you felt empty?"
1821
+ },
1822
+ {
1823
+ "user_input": "Life feels meaningless every day",
1824
+ "bot_response": "Existential pain is real. You matter.",
1825
+ "bot_followup": "What's changed recently?"
1826
+ },
1827
+ {
1828
+ "user_input": "I have no hope every day",
1829
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1830
+ "bot_followup": "What would hope look like?"
1831
+ },
1832
+ {
1833
+ "user_input": "Everything is pointless every day",
1834
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1835
+ "bot_followup": "What feels most pointless?"
1836
+ },
1837
+ {
1838
+ "user_input": "I'm in despair every day",
1839
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1840
+ "bot_followup": "What's causing this despair?"
1841
+ },
1842
+ {
1843
+ "user_input": "I feel defeated every day",
1844
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1845
+ "bot_followup": "What battles are you fighting?"
1846
+ },
1847
+ {
1848
+ "user_input": "Nothing will get better every day",
1849
+ "bot_response": "That permanence feeling is a depression symptom.",
1850
+ "bot_followup": "Have you felt this way before?"
1851
+ },
1852
+ {
1853
+ "user_input": "I feel hopeless all the time",
1854
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1855
+ "bot_followup": "What's making you feel this way?"
1856
+ },
1857
+ {
1858
+ "user_input": "Nothing matters anymore all the time",
1859
+ "bot_response": "When meaning fades, it's deeply painful.",
1860
+ "bot_followup": "When did things start feeling meaningless?"
1861
+ },
1862
+ {
1863
+ "user_input": "I see no point all the time",
1864
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1865
+ "bot_followup": "What used to give you purpose?"
1866
+ },
1867
+ {
1868
+ "user_input": "I feel empty all the time",
1869
+ "bot_response": "Emptiness is profound. I'm here with you.",
1870
+ "bot_followup": "How long have you felt empty?"
1871
+ },
1872
+ {
1873
+ "user_input": "Life feels meaningless all the time",
1874
+ "bot_response": "Existential pain is real. You matter.",
1875
+ "bot_followup": "What's changed recently?"
1876
+ },
1877
+ {
1878
+ "user_input": "I have no hope all the time",
1879
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1880
+ "bot_followup": "What would hope look like?"
1881
+ },
1882
+ {
1883
+ "user_input": "Everything is pointless all the time",
1884
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1885
+ "bot_followup": "What feels most pointless?"
1886
+ },
1887
+ {
1888
+ "user_input": "I'm in despair all the time",
1889
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1890
+ "bot_followup": "What's causing this despair?"
1891
+ },
1892
+ {
1893
+ "user_input": "I feel defeated all the time",
1894
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1895
+ "bot_followup": "What battles are you fighting?"
1896
+ },
1897
+ {
1898
+ "user_input": "Nothing will get better all the time",
1899
+ "bot_response": "That permanence feeling is a depression symptom.",
1900
+ "bot_followup": "Have you felt this way before?"
1901
+ },
1902
+ {
1903
+ "user_input": "I feel hopeless and I am tired",
1904
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1905
+ "bot_followup": "What's making you feel this way?"
1906
+ },
1907
+ {
1908
+ "user_input": "Nothing matters anymore and I am tired",
1909
+ "bot_response": "When meaning fades, it's deeply painful.",
1910
+ "bot_followup": "When did things start feeling meaningless?"
1911
+ },
1912
+ {
1913
+ "user_input": "I see no point and I am tired",
1914
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1915
+ "bot_followup": "What used to give you purpose?"
1916
+ },
1917
+ {
1918
+ "user_input": "I feel empty and I am tired",
1919
+ "bot_response": "Emptiness is profound. I'm here with you.",
1920
+ "bot_followup": "How long have you felt empty?"
1921
+ },
1922
+ {
1923
+ "user_input": "Life feels meaningless and I am tired",
1924
+ "bot_response": "Existential pain is real. You matter.",
1925
+ "bot_followup": "What's changed recently?"
1926
+ },
1927
+ {
1928
+ "user_input": "I have no hope and I am tired",
1929
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1930
+ "bot_followup": "What would hope look like?"
1931
+ },
1932
+ {
1933
+ "user_input": "Everything is pointless and I am tired",
1934
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1935
+ "bot_followup": "What feels most pointless?"
1936
+ },
1937
+ {
1938
+ "user_input": "I'm in despair and I am tired",
1939
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1940
+ "bot_followup": "What's causing this despair?"
1941
+ },
1942
+ {
1943
+ "user_input": "I feel defeated and I am tired",
1944
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1945
+ "bot_followup": "What battles are you fighting?"
1946
+ },
1947
+ {
1948
+ "user_input": "Nothing will get better and I am tired",
1949
+ "bot_response": "That permanence feeling is a depression symptom.",
1950
+ "bot_followup": "Have you felt this way before?"
1951
+ },
1952
+ {
1953
+ "user_input": "I feel hopeless constantly",
1954
+ "bot_response": "Hopelessness is heavy. You're not alone.",
1955
+ "bot_followup": "What's making you feel this way?"
1956
+ },
1957
+ {
1958
+ "user_input": "Nothing matters anymore constantly",
1959
+ "bot_response": "When meaning fades, it's deeply painful.",
1960
+ "bot_followup": "When did things start feeling meaningless?"
1961
+ },
1962
+ {
1963
+ "user_input": "I see no point constantly",
1964
+ "bot_response": "Losing purpose is devastating. Let's find small meaning.",
1965
+ "bot_followup": "What used to give you purpose?"
1966
+ },
1967
+ {
1968
+ "user_input": "I feel empty constantly",
1969
+ "bot_response": "Emptiness is profound. I'm here with you.",
1970
+ "bot_followup": "How long have you felt empty?"
1971
+ },
1972
+ {
1973
+ "user_input": "Life feels meaningless constantly",
1974
+ "bot_response": "Existential pain is real. You matter.",
1975
+ "bot_followup": "What's changed recently?"
1976
+ },
1977
+ {
1978
+ "user_input": "I have no hope constantly",
1979
+ "bot_response": "Hopelessness feels endless. It isn't. Stay with me.",
1980
+ "bot_followup": "What would hope look like?"
1981
+ },
1982
+ {
1983
+ "user_input": "Everything is pointless constantly",
1984
+ "bot_response": "That nihilistic feeling is crushing. You're valuable.",
1985
+ "bot_followup": "What feels most pointless?"
1986
+ },
1987
+ {
1988
+ "user_input": "I'm in despair constantly",
1989
+ "bot_response": "Despair is overwhelming. Please don't give up.",
1990
+ "bot_followup": "What's causing this despair?"
1991
+ },
1992
+ {
1993
+ "user_input": "I feel defeated constantly",
1994
+ "bot_response": "Feeling defeated is exhausting. Rest, don't quit.",
1995
+ "bot_followup": "What battles are you fighting?"
1996
+ },
1997
+ {
1998
+ "user_input": "Nothing will get better constantly",
1999
+ "bot_response": "That permanence feeling is a depression symptom.",
2000
+ "bot_followup": "Have you felt this way before?"
2001
+ }
2002
+ ]
rag_knowledges/happiness.json ADDED
The diff for this file is too large to render. See raw diff
 
rag_knowledges/neutral.json ADDED
@@ -0,0 +1,2002 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "user_input": "How are you",
4
+ "bot_response": "I'm here and ready to listen. How are you doing?",
5
+ "bot_followup": "What's on your mind today?"
6
+ },
7
+ {
8
+ "user_input": "What can you do",
9
+ "bot_response": "I'm here to listen and support you through anything.",
10
+ "bot_followup": "What would be helpful for you?"
11
+ },
12
+ {
13
+ "user_input": "Tell me about yourself",
14
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
15
+ "bot_followup": "What brings you here today?"
16
+ },
17
+ {
18
+ "user_input": "Can you help me",
19
+ "bot_response": "I'll do my best to support you. What do you need?",
20
+ "bot_followup": "What kind of help are you looking for?"
21
+ },
22
+ {
23
+ "user_input": "I need advice",
24
+ "bot_response": "I'm here to help. What situation are you facing?",
25
+ "bot_followup": "Tell me more about what's going on?"
26
+ },
27
+ {
28
+ "user_input": "How are you right now",
29
+ "bot_response": "I'm here and ready to listen. How are you doing?",
30
+ "bot_followup": "What's on your mind today?"
31
+ },
32
+ {
33
+ "user_input": "What can you do right now",
34
+ "bot_response": "I'm here to listen and support you through anything.",
35
+ "bot_followup": "What would be helpful for you?"
36
+ },
37
+ {
38
+ "user_input": "Tell me about yourself right now",
39
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
40
+ "bot_followup": "What brings you here today?"
41
+ },
42
+ {
43
+ "user_input": "Can you help me right now",
44
+ "bot_response": "I'll do my best to support you. What do you need?",
45
+ "bot_followup": "What kind of help are you looking for?"
46
+ },
47
+ {
48
+ "user_input": "I need advice right now",
49
+ "bot_response": "I'm here to help. What situation are you facing?",
50
+ "bot_followup": "Tell me more about what's going on?"
51
+ },
52
+ {
53
+ "user_input": "How are you today",
54
+ "bot_response": "I'm here and ready to listen. How are you doing?",
55
+ "bot_followup": "What's on your mind today?"
56
+ },
57
+ {
58
+ "user_input": "What can you do today",
59
+ "bot_response": "I'm here to listen and support you through anything.",
60
+ "bot_followup": "What would be helpful for you?"
61
+ },
62
+ {
63
+ "user_input": "Tell me about yourself today",
64
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
65
+ "bot_followup": "What brings you here today?"
66
+ },
67
+ {
68
+ "user_input": "Can you help me today",
69
+ "bot_response": "I'll do my best to support you. What do you need?",
70
+ "bot_followup": "What kind of help are you looking for?"
71
+ },
72
+ {
73
+ "user_input": "I need advice today",
74
+ "bot_response": "I'm here to help. What situation are you facing?",
75
+ "bot_followup": "Tell me more about what's going on?"
76
+ },
77
+ {
78
+ "user_input": "How are you please",
79
+ "bot_response": "I'm here and ready to listen. How are you doing?",
80
+ "bot_followup": "What's on your mind today?"
81
+ },
82
+ {
83
+ "user_input": "What can you do please",
84
+ "bot_response": "I'm here to listen and support you through anything.",
85
+ "bot_followup": "What would be helpful for you?"
86
+ },
87
+ {
88
+ "user_input": "Tell me about yourself please",
89
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
90
+ "bot_followup": "What brings you here today?"
91
+ },
92
+ {
93
+ "user_input": "Can you help me please",
94
+ "bot_response": "I'll do my best to support you. What do you need?",
95
+ "bot_followup": "What kind of help are you looking for?"
96
+ },
97
+ {
98
+ "user_input": "I need advice please",
99
+ "bot_response": "I'm here to help. What situation are you facing?",
100
+ "bot_followup": "Tell me more about what's going on?"
101
+ },
102
+ {
103
+ "user_input": "How are you",
104
+ "bot_response": "I'm here and ready to listen. How are you doing?",
105
+ "bot_followup": "What's on your mind today?"
106
+ },
107
+ {
108
+ "user_input": "What can you do",
109
+ "bot_response": "I'm here to listen and support you through anything.",
110
+ "bot_followup": "What would be helpful for you?"
111
+ },
112
+ {
113
+ "user_input": "Tell me about yourself",
114
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
115
+ "bot_followup": "What brings you here today?"
116
+ },
117
+ {
118
+ "user_input": "Can you help me",
119
+ "bot_response": "I'll do my best to support you. What do you need?",
120
+ "bot_followup": "What kind of help are you looking for?"
121
+ },
122
+ {
123
+ "user_input": "I need advice",
124
+ "bot_response": "I'm here to help. What situation are you facing?",
125
+ "bot_followup": "Tell me more about what's going on?"
126
+ },
127
+ {
128
+ "user_input": "How are you right now",
129
+ "bot_response": "I'm here and ready to listen. How are you doing?",
130
+ "bot_followup": "What's on your mind today?"
131
+ },
132
+ {
133
+ "user_input": "What can you do right now",
134
+ "bot_response": "I'm here to listen and support you through anything.",
135
+ "bot_followup": "What would be helpful for you?"
136
+ },
137
+ {
138
+ "user_input": "Tell me about yourself right now",
139
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
140
+ "bot_followup": "What brings you here today?"
141
+ },
142
+ {
143
+ "user_input": "Can you help me right now",
144
+ "bot_response": "I'll do my best to support you. What do you need?",
145
+ "bot_followup": "What kind of help are you looking for?"
146
+ },
147
+ {
148
+ "user_input": "I need advice right now",
149
+ "bot_response": "I'm here to help. What situation are you facing?",
150
+ "bot_followup": "Tell me more about what's going on?"
151
+ },
152
+ {
153
+ "user_input": "How are you today",
154
+ "bot_response": "I'm here and ready to listen. How are you doing?",
155
+ "bot_followup": "What's on your mind today?"
156
+ },
157
+ {
158
+ "user_input": "What can you do today",
159
+ "bot_response": "I'm here to listen and support you through anything.",
160
+ "bot_followup": "What would be helpful for you?"
161
+ },
162
+ {
163
+ "user_input": "Tell me about yourself today",
164
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
165
+ "bot_followup": "What brings you here today?"
166
+ },
167
+ {
168
+ "user_input": "Can you help me today",
169
+ "bot_response": "I'll do my best to support you. What do you need?",
170
+ "bot_followup": "What kind of help are you looking for?"
171
+ },
172
+ {
173
+ "user_input": "I need advice today",
174
+ "bot_response": "I'm here to help. What situation are you facing?",
175
+ "bot_followup": "Tell me more about what's going on?"
176
+ },
177
+ {
178
+ "user_input": "How are you please",
179
+ "bot_response": "I'm here and ready to listen. How are you doing?",
180
+ "bot_followup": "What's on your mind today?"
181
+ },
182
+ {
183
+ "user_input": "What can you do please",
184
+ "bot_response": "I'm here to listen and support you through anything.",
185
+ "bot_followup": "What would be helpful for you?"
186
+ },
187
+ {
188
+ "user_input": "Tell me about yourself please",
189
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
190
+ "bot_followup": "What brings you here today?"
191
+ },
192
+ {
193
+ "user_input": "Can you help me please",
194
+ "bot_response": "I'll do my best to support you. What do you need?",
195
+ "bot_followup": "What kind of help are you looking for?"
196
+ },
197
+ {
198
+ "user_input": "I need advice please",
199
+ "bot_response": "I'm here to help. What situation are you facing?",
200
+ "bot_followup": "Tell me more about what's going on?"
201
+ },
202
+ {
203
+ "user_input": "How are you",
204
+ "bot_response": "I'm here and ready to listen. How are you doing?",
205
+ "bot_followup": "What's on your mind today?"
206
+ },
207
+ {
208
+ "user_input": "What can you do",
209
+ "bot_response": "I'm here to listen and support you through anything.",
210
+ "bot_followup": "What would be helpful for you?"
211
+ },
212
+ {
213
+ "user_input": "Tell me about yourself",
214
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
215
+ "bot_followup": "What brings you here today?"
216
+ },
217
+ {
218
+ "user_input": "Can you help me",
219
+ "bot_response": "I'll do my best to support you. What do you need?",
220
+ "bot_followup": "What kind of help are you looking for?"
221
+ },
222
+ {
223
+ "user_input": "I need advice",
224
+ "bot_response": "I'm here to help. What situation are you facing?",
225
+ "bot_followup": "Tell me more about what's going on?"
226
+ },
227
+ {
228
+ "user_input": "How are you right now",
229
+ "bot_response": "I'm here and ready to listen. How are you doing?",
230
+ "bot_followup": "What's on your mind today?"
231
+ },
232
+ {
233
+ "user_input": "What can you do right now",
234
+ "bot_response": "I'm here to listen and support you through anything.",
235
+ "bot_followup": "What would be helpful for you?"
236
+ },
237
+ {
238
+ "user_input": "Tell me about yourself right now",
239
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
240
+ "bot_followup": "What brings you here today?"
241
+ },
242
+ {
243
+ "user_input": "Can you help me right now",
244
+ "bot_response": "I'll do my best to support you. What do you need?",
245
+ "bot_followup": "What kind of help are you looking for?"
246
+ },
247
+ {
248
+ "user_input": "I need advice right now",
249
+ "bot_response": "I'm here to help. What situation are you facing?",
250
+ "bot_followup": "Tell me more about what's going on?"
251
+ },
252
+ {
253
+ "user_input": "How are you today",
254
+ "bot_response": "I'm here and ready to listen. How are you doing?",
255
+ "bot_followup": "What's on your mind today?"
256
+ },
257
+ {
258
+ "user_input": "What can you do today",
259
+ "bot_response": "I'm here to listen and support you through anything.",
260
+ "bot_followup": "What would be helpful for you?"
261
+ },
262
+ {
263
+ "user_input": "Tell me about yourself today",
264
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
265
+ "bot_followup": "What brings you here today?"
266
+ },
267
+ {
268
+ "user_input": "Can you help me today",
269
+ "bot_response": "I'll do my best to support you. What do you need?",
270
+ "bot_followup": "What kind of help are you looking for?"
271
+ },
272
+ {
273
+ "user_input": "I need advice today",
274
+ "bot_response": "I'm here to help. What situation are you facing?",
275
+ "bot_followup": "Tell me more about what's going on?"
276
+ },
277
+ {
278
+ "user_input": "How are you please",
279
+ "bot_response": "I'm here and ready to listen. How are you doing?",
280
+ "bot_followup": "What's on your mind today?"
281
+ },
282
+ {
283
+ "user_input": "What can you do please",
284
+ "bot_response": "I'm here to listen and support you through anything.",
285
+ "bot_followup": "What would be helpful for you?"
286
+ },
287
+ {
288
+ "user_input": "Tell me about yourself please",
289
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
290
+ "bot_followup": "What brings you here today?"
291
+ },
292
+ {
293
+ "user_input": "Can you help me please",
294
+ "bot_response": "I'll do my best to support you. What do you need?",
295
+ "bot_followup": "What kind of help are you looking for?"
296
+ },
297
+ {
298
+ "user_input": "I need advice please",
299
+ "bot_response": "I'm here to help. What situation are you facing?",
300
+ "bot_followup": "Tell me more about what's going on?"
301
+ },
302
+ {
303
+ "user_input": "How are you",
304
+ "bot_response": "I'm here and ready to listen. How are you doing?",
305
+ "bot_followup": "What's on your mind today?"
306
+ },
307
+ {
308
+ "user_input": "What can you do",
309
+ "bot_response": "I'm here to listen and support you through anything.",
310
+ "bot_followup": "What would be helpful for you?"
311
+ },
312
+ {
313
+ "user_input": "Tell me about yourself",
314
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
315
+ "bot_followup": "What brings you here today?"
316
+ },
317
+ {
318
+ "user_input": "Can you help me",
319
+ "bot_response": "I'll do my best to support you. What do you need?",
320
+ "bot_followup": "What kind of help are you looking for?"
321
+ },
322
+ {
323
+ "user_input": "I need advice",
324
+ "bot_response": "I'm here to help. What situation are you facing?",
325
+ "bot_followup": "Tell me more about what's going on?"
326
+ },
327
+ {
328
+ "user_input": "How are you right now",
329
+ "bot_response": "I'm here and ready to listen. How are you doing?",
330
+ "bot_followup": "What's on your mind today?"
331
+ },
332
+ {
333
+ "user_input": "What can you do right now",
334
+ "bot_response": "I'm here to listen and support you through anything.",
335
+ "bot_followup": "What would be helpful for you?"
336
+ },
337
+ {
338
+ "user_input": "Tell me about yourself right now",
339
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
340
+ "bot_followup": "What brings you here today?"
341
+ },
342
+ {
343
+ "user_input": "Can you help me right now",
344
+ "bot_response": "I'll do my best to support you. What do you need?",
345
+ "bot_followup": "What kind of help are you looking for?"
346
+ },
347
+ {
348
+ "user_input": "I need advice right now",
349
+ "bot_response": "I'm here to help. What situation are you facing?",
350
+ "bot_followup": "Tell me more about what's going on?"
351
+ },
352
+ {
353
+ "user_input": "How are you today",
354
+ "bot_response": "I'm here and ready to listen. How are you doing?",
355
+ "bot_followup": "What's on your mind today?"
356
+ },
357
+ {
358
+ "user_input": "What can you do today",
359
+ "bot_response": "I'm here to listen and support you through anything.",
360
+ "bot_followup": "What would be helpful for you?"
361
+ },
362
+ {
363
+ "user_input": "Tell me about yourself today",
364
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
365
+ "bot_followup": "What brings you here today?"
366
+ },
367
+ {
368
+ "user_input": "Can you help me today",
369
+ "bot_response": "I'll do my best to support you. What do you need?",
370
+ "bot_followup": "What kind of help are you looking for?"
371
+ },
372
+ {
373
+ "user_input": "I need advice today",
374
+ "bot_response": "I'm here to help. What situation are you facing?",
375
+ "bot_followup": "Tell me more about what's going on?"
376
+ },
377
+ {
378
+ "user_input": "How are you please",
379
+ "bot_response": "I'm here and ready to listen. How are you doing?",
380
+ "bot_followup": "What's on your mind today?"
381
+ },
382
+ {
383
+ "user_input": "What can you do please",
384
+ "bot_response": "I'm here to listen and support you through anything.",
385
+ "bot_followup": "What would be helpful for you?"
386
+ },
387
+ {
388
+ "user_input": "Tell me about yourself please",
389
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
390
+ "bot_followup": "What brings you here today?"
391
+ },
392
+ {
393
+ "user_input": "Can you help me please",
394
+ "bot_response": "I'll do my best to support you. What do you need?",
395
+ "bot_followup": "What kind of help are you looking for?"
396
+ },
397
+ {
398
+ "user_input": "I need advice please",
399
+ "bot_response": "I'm here to help. What situation are you facing?",
400
+ "bot_followup": "Tell me more about what's going on?"
401
+ },
402
+ {
403
+ "user_input": "How are you",
404
+ "bot_response": "I'm here and ready to listen. How are you doing?",
405
+ "bot_followup": "What's on your mind today?"
406
+ },
407
+ {
408
+ "user_input": "What can you do",
409
+ "bot_response": "I'm here to listen and support you through anything.",
410
+ "bot_followup": "What would be helpful for you?"
411
+ },
412
+ {
413
+ "user_input": "Tell me about yourself",
414
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
415
+ "bot_followup": "What brings you here today?"
416
+ },
417
+ {
418
+ "user_input": "Can you help me",
419
+ "bot_response": "I'll do my best to support you. What do you need?",
420
+ "bot_followup": "What kind of help are you looking for?"
421
+ },
422
+ {
423
+ "user_input": "I need advice",
424
+ "bot_response": "I'm here to help. What situation are you facing?",
425
+ "bot_followup": "Tell me more about what's going on?"
426
+ },
427
+ {
428
+ "user_input": "How are you right now",
429
+ "bot_response": "I'm here and ready to listen. How are you doing?",
430
+ "bot_followup": "What's on your mind today?"
431
+ },
432
+ {
433
+ "user_input": "What can you do right now",
434
+ "bot_response": "I'm here to listen and support you through anything.",
435
+ "bot_followup": "What would be helpful for you?"
436
+ },
437
+ {
438
+ "user_input": "Tell me about yourself right now",
439
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
440
+ "bot_followup": "What brings you here today?"
441
+ },
442
+ {
443
+ "user_input": "Can you help me right now",
444
+ "bot_response": "I'll do my best to support you. What do you need?",
445
+ "bot_followup": "What kind of help are you looking for?"
446
+ },
447
+ {
448
+ "user_input": "I need advice right now",
449
+ "bot_response": "I'm here to help. What situation are you facing?",
450
+ "bot_followup": "Tell me more about what's going on?"
451
+ },
452
+ {
453
+ "user_input": "How are you today",
454
+ "bot_response": "I'm here and ready to listen. How are you doing?",
455
+ "bot_followup": "What's on your mind today?"
456
+ },
457
+ {
458
+ "user_input": "What can you do today",
459
+ "bot_response": "I'm here to listen and support you through anything.",
460
+ "bot_followup": "What would be helpful for you?"
461
+ },
462
+ {
463
+ "user_input": "Tell me about yourself today",
464
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
465
+ "bot_followup": "What brings you here today?"
466
+ },
467
+ {
468
+ "user_input": "Can you help me today",
469
+ "bot_response": "I'll do my best to support you. What do you need?",
470
+ "bot_followup": "What kind of help are you looking for?"
471
+ },
472
+ {
473
+ "user_input": "I need advice today",
474
+ "bot_response": "I'm here to help. What situation are you facing?",
475
+ "bot_followup": "Tell me more about what's going on?"
476
+ },
477
+ {
478
+ "user_input": "How are you please",
479
+ "bot_response": "I'm here and ready to listen. How are you doing?",
480
+ "bot_followup": "What's on your mind today?"
481
+ },
482
+ {
483
+ "user_input": "What can you do please",
484
+ "bot_response": "I'm here to listen and support you through anything.",
485
+ "bot_followup": "What would be helpful for you?"
486
+ },
487
+ {
488
+ "user_input": "Tell me about yourself please",
489
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
490
+ "bot_followup": "What brings you here today?"
491
+ },
492
+ {
493
+ "user_input": "Can you help me please",
494
+ "bot_response": "I'll do my best to support you. What do you need?",
495
+ "bot_followup": "What kind of help are you looking for?"
496
+ },
497
+ {
498
+ "user_input": "I need advice please",
499
+ "bot_response": "I'm here to help. What situation are you facing?",
500
+ "bot_followup": "Tell me more about what's going on?"
501
+ },
502
+ {
503
+ "user_input": "How are you",
504
+ "bot_response": "I'm here and ready to listen. How are you doing?",
505
+ "bot_followup": "What's on your mind today?"
506
+ },
507
+ {
508
+ "user_input": "What can you do",
509
+ "bot_response": "I'm here to listen and support you through anything.",
510
+ "bot_followup": "What would be helpful for you?"
511
+ },
512
+ {
513
+ "user_input": "Tell me about yourself",
514
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
515
+ "bot_followup": "What brings you here today?"
516
+ },
517
+ {
518
+ "user_input": "Can you help me",
519
+ "bot_response": "I'll do my best to support you. What do you need?",
520
+ "bot_followup": "What kind of help are you looking for?"
521
+ },
522
+ {
523
+ "user_input": "I need advice",
524
+ "bot_response": "I'm here to help. What situation are you facing?",
525
+ "bot_followup": "Tell me more about what's going on?"
526
+ },
527
+ {
528
+ "user_input": "How are you right now",
529
+ "bot_response": "I'm here and ready to listen. How are you doing?",
530
+ "bot_followup": "What's on your mind today?"
531
+ },
532
+ {
533
+ "user_input": "What can you do right now",
534
+ "bot_response": "I'm here to listen and support you through anything.",
535
+ "bot_followup": "What would be helpful for you?"
536
+ },
537
+ {
538
+ "user_input": "Tell me about yourself right now",
539
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
540
+ "bot_followup": "What brings you here today?"
541
+ },
542
+ {
543
+ "user_input": "Can you help me right now",
544
+ "bot_response": "I'll do my best to support you. What do you need?",
545
+ "bot_followup": "What kind of help are you looking for?"
546
+ },
547
+ {
548
+ "user_input": "I need advice right now",
549
+ "bot_response": "I'm here to help. What situation are you facing?",
550
+ "bot_followup": "Tell me more about what's going on?"
551
+ },
552
+ {
553
+ "user_input": "How are you today",
554
+ "bot_response": "I'm here and ready to listen. How are you doing?",
555
+ "bot_followup": "What's on your mind today?"
556
+ },
557
+ {
558
+ "user_input": "What can you do today",
559
+ "bot_response": "I'm here to listen and support you through anything.",
560
+ "bot_followup": "What would be helpful for you?"
561
+ },
562
+ {
563
+ "user_input": "Tell me about yourself today",
564
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
565
+ "bot_followup": "What brings you here today?"
566
+ },
567
+ {
568
+ "user_input": "Can you help me today",
569
+ "bot_response": "I'll do my best to support you. What do you need?",
570
+ "bot_followup": "What kind of help are you looking for?"
571
+ },
572
+ {
573
+ "user_input": "I need advice today",
574
+ "bot_response": "I'm here to help. What situation are you facing?",
575
+ "bot_followup": "Tell me more about what's going on?"
576
+ },
577
+ {
578
+ "user_input": "How are you please",
579
+ "bot_response": "I'm here and ready to listen. How are you doing?",
580
+ "bot_followup": "What's on your mind today?"
581
+ },
582
+ {
583
+ "user_input": "What can you do please",
584
+ "bot_response": "I'm here to listen and support you through anything.",
585
+ "bot_followup": "What would be helpful for you?"
586
+ },
587
+ {
588
+ "user_input": "Tell me about yourself please",
589
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
590
+ "bot_followup": "What brings you here today?"
591
+ },
592
+ {
593
+ "user_input": "Can you help me please",
594
+ "bot_response": "I'll do my best to support you. What do you need?",
595
+ "bot_followup": "What kind of help are you looking for?"
596
+ },
597
+ {
598
+ "user_input": "I need advice please",
599
+ "bot_response": "I'm here to help. What situation are you facing?",
600
+ "bot_followup": "Tell me more about what's going on?"
601
+ },
602
+ {
603
+ "user_input": "How are you",
604
+ "bot_response": "I'm here and ready to listen. How are you doing?",
605
+ "bot_followup": "What's on your mind today?"
606
+ },
607
+ {
608
+ "user_input": "What can you do",
609
+ "bot_response": "I'm here to listen and support you through anything.",
610
+ "bot_followup": "What would be helpful for you?"
611
+ },
612
+ {
613
+ "user_input": "Tell me about yourself",
614
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
615
+ "bot_followup": "What brings you here today?"
616
+ },
617
+ {
618
+ "user_input": "Can you help me",
619
+ "bot_response": "I'll do my best to support you. What do you need?",
620
+ "bot_followup": "What kind of help are you looking for?"
621
+ },
622
+ {
623
+ "user_input": "I need advice",
624
+ "bot_response": "I'm here to help. What situation are you facing?",
625
+ "bot_followup": "Tell me more about what's going on?"
626
+ },
627
+ {
628
+ "user_input": "How are you right now",
629
+ "bot_response": "I'm here and ready to listen. How are you doing?",
630
+ "bot_followup": "What's on your mind today?"
631
+ },
632
+ {
633
+ "user_input": "What can you do right now",
634
+ "bot_response": "I'm here to listen and support you through anything.",
635
+ "bot_followup": "What would be helpful for you?"
636
+ },
637
+ {
638
+ "user_input": "Tell me about yourself right now",
639
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
640
+ "bot_followup": "What brings you here today?"
641
+ },
642
+ {
643
+ "user_input": "Can you help me right now",
644
+ "bot_response": "I'll do my best to support you. What do you need?",
645
+ "bot_followup": "What kind of help are you looking for?"
646
+ },
647
+ {
648
+ "user_input": "I need advice right now",
649
+ "bot_response": "I'm here to help. What situation are you facing?",
650
+ "bot_followup": "Tell me more about what's going on?"
651
+ },
652
+ {
653
+ "user_input": "How are you today",
654
+ "bot_response": "I'm here and ready to listen. How are you doing?",
655
+ "bot_followup": "What's on your mind today?"
656
+ },
657
+ {
658
+ "user_input": "What can you do today",
659
+ "bot_response": "I'm here to listen and support you through anything.",
660
+ "bot_followup": "What would be helpful for you?"
661
+ },
662
+ {
663
+ "user_input": "Tell me about yourself today",
664
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
665
+ "bot_followup": "What brings you here today?"
666
+ },
667
+ {
668
+ "user_input": "Can you help me today",
669
+ "bot_response": "I'll do my best to support you. What do you need?",
670
+ "bot_followup": "What kind of help are you looking for?"
671
+ },
672
+ {
673
+ "user_input": "I need advice today",
674
+ "bot_response": "I'm here to help. What situation are you facing?",
675
+ "bot_followup": "Tell me more about what's going on?"
676
+ },
677
+ {
678
+ "user_input": "How are you please",
679
+ "bot_response": "I'm here and ready to listen. How are you doing?",
680
+ "bot_followup": "What's on your mind today?"
681
+ },
682
+ {
683
+ "user_input": "What can you do please",
684
+ "bot_response": "I'm here to listen and support you through anything.",
685
+ "bot_followup": "What would be helpful for you?"
686
+ },
687
+ {
688
+ "user_input": "Tell me about yourself please",
689
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
690
+ "bot_followup": "What brings you here today?"
691
+ },
692
+ {
693
+ "user_input": "Can you help me please",
694
+ "bot_response": "I'll do my best to support you. What do you need?",
695
+ "bot_followup": "What kind of help are you looking for?"
696
+ },
697
+ {
698
+ "user_input": "I need advice please",
699
+ "bot_response": "I'm here to help. What situation are you facing?",
700
+ "bot_followup": "Tell me more about what's going on?"
701
+ },
702
+ {
703
+ "user_input": "How are you",
704
+ "bot_response": "I'm here and ready to listen. How are you doing?",
705
+ "bot_followup": "What's on your mind today?"
706
+ },
707
+ {
708
+ "user_input": "What can you do",
709
+ "bot_response": "I'm here to listen and support you through anything.",
710
+ "bot_followup": "What would be helpful for you?"
711
+ },
712
+ {
713
+ "user_input": "Tell me about yourself",
714
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
715
+ "bot_followup": "What brings you here today?"
716
+ },
717
+ {
718
+ "user_input": "Can you help me",
719
+ "bot_response": "I'll do my best to support you. What do you need?",
720
+ "bot_followup": "What kind of help are you looking for?"
721
+ },
722
+ {
723
+ "user_input": "I need advice",
724
+ "bot_response": "I'm here to help. What situation are you facing?",
725
+ "bot_followup": "Tell me more about what's going on?"
726
+ },
727
+ {
728
+ "user_input": "How are you right now",
729
+ "bot_response": "I'm here and ready to listen. How are you doing?",
730
+ "bot_followup": "What's on your mind today?"
731
+ },
732
+ {
733
+ "user_input": "What can you do right now",
734
+ "bot_response": "I'm here to listen and support you through anything.",
735
+ "bot_followup": "What would be helpful for you?"
736
+ },
737
+ {
738
+ "user_input": "Tell me about yourself right now",
739
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
740
+ "bot_followup": "What brings you here today?"
741
+ },
742
+ {
743
+ "user_input": "Can you help me right now",
744
+ "bot_response": "I'll do my best to support you. What do you need?",
745
+ "bot_followup": "What kind of help are you looking for?"
746
+ },
747
+ {
748
+ "user_input": "I need advice right now",
749
+ "bot_response": "I'm here to help. What situation are you facing?",
750
+ "bot_followup": "Tell me more about what's going on?"
751
+ },
752
+ {
753
+ "user_input": "How are you today",
754
+ "bot_response": "I'm here and ready to listen. How are you doing?",
755
+ "bot_followup": "What's on your mind today?"
756
+ },
757
+ {
758
+ "user_input": "What can you do today",
759
+ "bot_response": "I'm here to listen and support you through anything.",
760
+ "bot_followup": "What would be helpful for you?"
761
+ },
762
+ {
763
+ "user_input": "Tell me about yourself today",
764
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
765
+ "bot_followup": "What brings you here today?"
766
+ },
767
+ {
768
+ "user_input": "Can you help me today",
769
+ "bot_response": "I'll do my best to support you. What do you need?",
770
+ "bot_followup": "What kind of help are you looking for?"
771
+ },
772
+ {
773
+ "user_input": "I need advice today",
774
+ "bot_response": "I'm here to help. What situation are you facing?",
775
+ "bot_followup": "Tell me more about what's going on?"
776
+ },
777
+ {
778
+ "user_input": "How are you please",
779
+ "bot_response": "I'm here and ready to listen. How are you doing?",
780
+ "bot_followup": "What's on your mind today?"
781
+ },
782
+ {
783
+ "user_input": "What can you do please",
784
+ "bot_response": "I'm here to listen and support you through anything.",
785
+ "bot_followup": "What would be helpful for you?"
786
+ },
787
+ {
788
+ "user_input": "Tell me about yourself please",
789
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
790
+ "bot_followup": "What brings you here today?"
791
+ },
792
+ {
793
+ "user_input": "Can you help me please",
794
+ "bot_response": "I'll do my best to support you. What do you need?",
795
+ "bot_followup": "What kind of help are you looking for?"
796
+ },
797
+ {
798
+ "user_input": "I need advice please",
799
+ "bot_response": "I'm here to help. What situation are you facing?",
800
+ "bot_followup": "Tell me more about what's going on?"
801
+ },
802
+ {
803
+ "user_input": "How are you",
804
+ "bot_response": "I'm here and ready to listen. How are you doing?",
805
+ "bot_followup": "What's on your mind today?"
806
+ },
807
+ {
808
+ "user_input": "What can you do",
809
+ "bot_response": "I'm here to listen and support you through anything.",
810
+ "bot_followup": "What would be helpful for you?"
811
+ },
812
+ {
813
+ "user_input": "Tell me about yourself",
814
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
815
+ "bot_followup": "What brings you here today?"
816
+ },
817
+ {
818
+ "user_input": "Can you help me",
819
+ "bot_response": "I'll do my best to support you. What do you need?",
820
+ "bot_followup": "What kind of help are you looking for?"
821
+ },
822
+ {
823
+ "user_input": "I need advice",
824
+ "bot_response": "I'm here to help. What situation are you facing?",
825
+ "bot_followup": "Tell me more about what's going on?"
826
+ },
827
+ {
828
+ "user_input": "How are you right now",
829
+ "bot_response": "I'm here and ready to listen. How are you doing?",
830
+ "bot_followup": "What's on your mind today?"
831
+ },
832
+ {
833
+ "user_input": "What can you do right now",
834
+ "bot_response": "I'm here to listen and support you through anything.",
835
+ "bot_followup": "What would be helpful for you?"
836
+ },
837
+ {
838
+ "user_input": "Tell me about yourself right now",
839
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
840
+ "bot_followup": "What brings you here today?"
841
+ },
842
+ {
843
+ "user_input": "Can you help me right now",
844
+ "bot_response": "I'll do my best to support you. What do you need?",
845
+ "bot_followup": "What kind of help are you looking for?"
846
+ },
847
+ {
848
+ "user_input": "I need advice right now",
849
+ "bot_response": "I'm here to help. What situation are you facing?",
850
+ "bot_followup": "Tell me more about what's going on?"
851
+ },
852
+ {
853
+ "user_input": "How are you today",
854
+ "bot_response": "I'm here and ready to listen. How are you doing?",
855
+ "bot_followup": "What's on your mind today?"
856
+ },
857
+ {
858
+ "user_input": "What can you do today",
859
+ "bot_response": "I'm here to listen and support you through anything.",
860
+ "bot_followup": "What would be helpful for you?"
861
+ },
862
+ {
863
+ "user_input": "Tell me about yourself today",
864
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
865
+ "bot_followup": "What brings you here today?"
866
+ },
867
+ {
868
+ "user_input": "Can you help me today",
869
+ "bot_response": "I'll do my best to support you. What do you need?",
870
+ "bot_followup": "What kind of help are you looking for?"
871
+ },
872
+ {
873
+ "user_input": "I need advice today",
874
+ "bot_response": "I'm here to help. What situation are you facing?",
875
+ "bot_followup": "Tell me more about what's going on?"
876
+ },
877
+ {
878
+ "user_input": "How are you please",
879
+ "bot_response": "I'm here and ready to listen. How are you doing?",
880
+ "bot_followup": "What's on your mind today?"
881
+ },
882
+ {
883
+ "user_input": "What can you do please",
884
+ "bot_response": "I'm here to listen and support you through anything.",
885
+ "bot_followup": "What would be helpful for you?"
886
+ },
887
+ {
888
+ "user_input": "Tell me about yourself please",
889
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
890
+ "bot_followup": "What brings you here today?"
891
+ },
892
+ {
893
+ "user_input": "Can you help me please",
894
+ "bot_response": "I'll do my best to support you. What do you need?",
895
+ "bot_followup": "What kind of help are you looking for?"
896
+ },
897
+ {
898
+ "user_input": "I need advice please",
899
+ "bot_response": "I'm here to help. What situation are you facing?",
900
+ "bot_followup": "Tell me more about what's going on?"
901
+ },
902
+ {
903
+ "user_input": "How are you",
904
+ "bot_response": "I'm here and ready to listen. How are you doing?",
905
+ "bot_followup": "What's on your mind today?"
906
+ },
907
+ {
908
+ "user_input": "What can you do",
909
+ "bot_response": "I'm here to listen and support you through anything.",
910
+ "bot_followup": "What would be helpful for you?"
911
+ },
912
+ {
913
+ "user_input": "Tell me about yourself",
914
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
915
+ "bot_followup": "What brings you here today?"
916
+ },
917
+ {
918
+ "user_input": "Can you help me",
919
+ "bot_response": "I'll do my best to support you. What do you need?",
920
+ "bot_followup": "What kind of help are you looking for?"
921
+ },
922
+ {
923
+ "user_input": "I need advice",
924
+ "bot_response": "I'm here to help. What situation are you facing?",
925
+ "bot_followup": "Tell me more about what's going on?"
926
+ },
927
+ {
928
+ "user_input": "How are you right now",
929
+ "bot_response": "I'm here and ready to listen. How are you doing?",
930
+ "bot_followup": "What's on your mind today?"
931
+ },
932
+ {
933
+ "user_input": "What can you do right now",
934
+ "bot_response": "I'm here to listen and support you through anything.",
935
+ "bot_followup": "What would be helpful for you?"
936
+ },
937
+ {
938
+ "user_input": "Tell me about yourself right now",
939
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
940
+ "bot_followup": "What brings you here today?"
941
+ },
942
+ {
943
+ "user_input": "Can you help me right now",
944
+ "bot_response": "I'll do my best to support you. What do you need?",
945
+ "bot_followup": "What kind of help are you looking for?"
946
+ },
947
+ {
948
+ "user_input": "I need advice right now",
949
+ "bot_response": "I'm here to help. What situation are you facing?",
950
+ "bot_followup": "Tell me more about what's going on?"
951
+ },
952
+ {
953
+ "user_input": "How are you today",
954
+ "bot_response": "I'm here and ready to listen. How are you doing?",
955
+ "bot_followup": "What's on your mind today?"
956
+ },
957
+ {
958
+ "user_input": "What can you do today",
959
+ "bot_response": "I'm here to listen and support you through anything.",
960
+ "bot_followup": "What would be helpful for you?"
961
+ },
962
+ {
963
+ "user_input": "Tell me about yourself today",
964
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
965
+ "bot_followup": "What brings you here today?"
966
+ },
967
+ {
968
+ "user_input": "Can you help me today",
969
+ "bot_response": "I'll do my best to support you. What do you need?",
970
+ "bot_followup": "What kind of help are you looking for?"
971
+ },
972
+ {
973
+ "user_input": "I need advice today",
974
+ "bot_response": "I'm here to help. What situation are you facing?",
975
+ "bot_followup": "Tell me more about what's going on?"
976
+ },
977
+ {
978
+ "user_input": "How are you please",
979
+ "bot_response": "I'm here and ready to listen. How are you doing?",
980
+ "bot_followup": "What's on your mind today?"
981
+ },
982
+ {
983
+ "user_input": "What can you do please",
984
+ "bot_response": "I'm here to listen and support you through anything.",
985
+ "bot_followup": "What would be helpful for you?"
986
+ },
987
+ {
988
+ "user_input": "Tell me about yourself please",
989
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
990
+ "bot_followup": "What brings you here today?"
991
+ },
992
+ {
993
+ "user_input": "Can you help me please",
994
+ "bot_response": "I'll do my best to support you. What do you need?",
995
+ "bot_followup": "What kind of help are you looking for?"
996
+ },
997
+ {
998
+ "user_input": "I need advice please",
999
+ "bot_response": "I'm here to help. What situation are you facing?",
1000
+ "bot_followup": "Tell me more about what's going on?"
1001
+ },
1002
+ {
1003
+ "user_input": "How are you",
1004
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1005
+ "bot_followup": "What's on your mind today?"
1006
+ },
1007
+ {
1008
+ "user_input": "What can you do",
1009
+ "bot_response": "I'm here to listen and support you through anything.",
1010
+ "bot_followup": "What would be helpful for you?"
1011
+ },
1012
+ {
1013
+ "user_input": "Tell me about yourself",
1014
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1015
+ "bot_followup": "What brings you here today?"
1016
+ },
1017
+ {
1018
+ "user_input": "Can you help me",
1019
+ "bot_response": "I'll do my best to support you. What do you need?",
1020
+ "bot_followup": "What kind of help are you looking for?"
1021
+ },
1022
+ {
1023
+ "user_input": "I need advice",
1024
+ "bot_response": "I'm here to help. What situation are you facing?",
1025
+ "bot_followup": "Tell me more about what's going on?"
1026
+ },
1027
+ {
1028
+ "user_input": "How are you right now",
1029
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1030
+ "bot_followup": "What's on your mind today?"
1031
+ },
1032
+ {
1033
+ "user_input": "What can you do right now",
1034
+ "bot_response": "I'm here to listen and support you through anything.",
1035
+ "bot_followup": "What would be helpful for you?"
1036
+ },
1037
+ {
1038
+ "user_input": "Tell me about yourself right now",
1039
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1040
+ "bot_followup": "What brings you here today?"
1041
+ },
1042
+ {
1043
+ "user_input": "Can you help me right now",
1044
+ "bot_response": "I'll do my best to support you. What do you need?",
1045
+ "bot_followup": "What kind of help are you looking for?"
1046
+ },
1047
+ {
1048
+ "user_input": "I need advice right now",
1049
+ "bot_response": "I'm here to help. What situation are you facing?",
1050
+ "bot_followup": "Tell me more about what's going on?"
1051
+ },
1052
+ {
1053
+ "user_input": "How are you today",
1054
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1055
+ "bot_followup": "What's on your mind today?"
1056
+ },
1057
+ {
1058
+ "user_input": "What can you do today",
1059
+ "bot_response": "I'm here to listen and support you through anything.",
1060
+ "bot_followup": "What would be helpful for you?"
1061
+ },
1062
+ {
1063
+ "user_input": "Tell me about yourself today",
1064
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1065
+ "bot_followup": "What brings you here today?"
1066
+ },
1067
+ {
1068
+ "user_input": "Can you help me today",
1069
+ "bot_response": "I'll do my best to support you. What do you need?",
1070
+ "bot_followup": "What kind of help are you looking for?"
1071
+ },
1072
+ {
1073
+ "user_input": "I need advice today",
1074
+ "bot_response": "I'm here to help. What situation are you facing?",
1075
+ "bot_followup": "Tell me more about what's going on?"
1076
+ },
1077
+ {
1078
+ "user_input": "How are you please",
1079
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1080
+ "bot_followup": "What's on your mind today?"
1081
+ },
1082
+ {
1083
+ "user_input": "What can you do please",
1084
+ "bot_response": "I'm here to listen and support you through anything.",
1085
+ "bot_followup": "What would be helpful for you?"
1086
+ },
1087
+ {
1088
+ "user_input": "Tell me about yourself please",
1089
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1090
+ "bot_followup": "What brings you here today?"
1091
+ },
1092
+ {
1093
+ "user_input": "Can you help me please",
1094
+ "bot_response": "I'll do my best to support you. What do you need?",
1095
+ "bot_followup": "What kind of help are you looking for?"
1096
+ },
1097
+ {
1098
+ "user_input": "I need advice please",
1099
+ "bot_response": "I'm here to help. What situation are you facing?",
1100
+ "bot_followup": "Tell me more about what's going on?"
1101
+ },
1102
+ {
1103
+ "user_input": "How are you",
1104
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1105
+ "bot_followup": "What's on your mind today?"
1106
+ },
1107
+ {
1108
+ "user_input": "What can you do",
1109
+ "bot_response": "I'm here to listen and support you through anything.",
1110
+ "bot_followup": "What would be helpful for you?"
1111
+ },
1112
+ {
1113
+ "user_input": "Tell me about yourself",
1114
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1115
+ "bot_followup": "What brings you here today?"
1116
+ },
1117
+ {
1118
+ "user_input": "Can you help me",
1119
+ "bot_response": "I'll do my best to support you. What do you need?",
1120
+ "bot_followup": "What kind of help are you looking for?"
1121
+ },
1122
+ {
1123
+ "user_input": "I need advice",
1124
+ "bot_response": "I'm here to help. What situation are you facing?",
1125
+ "bot_followup": "Tell me more about what's going on?"
1126
+ },
1127
+ {
1128
+ "user_input": "How are you right now",
1129
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1130
+ "bot_followup": "What's on your mind today?"
1131
+ },
1132
+ {
1133
+ "user_input": "What can you do right now",
1134
+ "bot_response": "I'm here to listen and support you through anything.",
1135
+ "bot_followup": "What would be helpful for you?"
1136
+ },
1137
+ {
1138
+ "user_input": "Tell me about yourself right now",
1139
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1140
+ "bot_followup": "What brings you here today?"
1141
+ },
1142
+ {
1143
+ "user_input": "Can you help me right now",
1144
+ "bot_response": "I'll do my best to support you. What do you need?",
1145
+ "bot_followup": "What kind of help are you looking for?"
1146
+ },
1147
+ {
1148
+ "user_input": "I need advice right now",
1149
+ "bot_response": "I'm here to help. What situation are you facing?",
1150
+ "bot_followup": "Tell me more about what's going on?"
1151
+ },
1152
+ {
1153
+ "user_input": "How are you today",
1154
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1155
+ "bot_followup": "What's on your mind today?"
1156
+ },
1157
+ {
1158
+ "user_input": "What can you do today",
1159
+ "bot_response": "I'm here to listen and support you through anything.",
1160
+ "bot_followup": "What would be helpful for you?"
1161
+ },
1162
+ {
1163
+ "user_input": "Tell me about yourself today",
1164
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1165
+ "bot_followup": "What brings you here today?"
1166
+ },
1167
+ {
1168
+ "user_input": "Can you help me today",
1169
+ "bot_response": "I'll do my best to support you. What do you need?",
1170
+ "bot_followup": "What kind of help are you looking for?"
1171
+ },
1172
+ {
1173
+ "user_input": "I need advice today",
1174
+ "bot_response": "I'm here to help. What situation are you facing?",
1175
+ "bot_followup": "Tell me more about what's going on?"
1176
+ },
1177
+ {
1178
+ "user_input": "How are you please",
1179
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1180
+ "bot_followup": "What's on your mind today?"
1181
+ },
1182
+ {
1183
+ "user_input": "What can you do please",
1184
+ "bot_response": "I'm here to listen and support you through anything.",
1185
+ "bot_followup": "What would be helpful for you?"
1186
+ },
1187
+ {
1188
+ "user_input": "Tell me about yourself please",
1189
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1190
+ "bot_followup": "What brings you here today?"
1191
+ },
1192
+ {
1193
+ "user_input": "Can you help me please",
1194
+ "bot_response": "I'll do my best to support you. What do you need?",
1195
+ "bot_followup": "What kind of help are you looking for?"
1196
+ },
1197
+ {
1198
+ "user_input": "I need advice please",
1199
+ "bot_response": "I'm here to help. What situation are you facing?",
1200
+ "bot_followup": "Tell me more about what's going on?"
1201
+ },
1202
+ {
1203
+ "user_input": "How are you",
1204
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1205
+ "bot_followup": "What's on your mind today?"
1206
+ },
1207
+ {
1208
+ "user_input": "What can you do",
1209
+ "bot_response": "I'm here to listen and support you through anything.",
1210
+ "bot_followup": "What would be helpful for you?"
1211
+ },
1212
+ {
1213
+ "user_input": "Tell me about yourself",
1214
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1215
+ "bot_followup": "What brings you here today?"
1216
+ },
1217
+ {
1218
+ "user_input": "Can you help me",
1219
+ "bot_response": "I'll do my best to support you. What do you need?",
1220
+ "bot_followup": "What kind of help are you looking for?"
1221
+ },
1222
+ {
1223
+ "user_input": "I need advice",
1224
+ "bot_response": "I'm here to help. What situation are you facing?",
1225
+ "bot_followup": "Tell me more about what's going on?"
1226
+ },
1227
+ {
1228
+ "user_input": "How are you right now",
1229
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1230
+ "bot_followup": "What's on your mind today?"
1231
+ },
1232
+ {
1233
+ "user_input": "What can you do right now",
1234
+ "bot_response": "I'm here to listen and support you through anything.",
1235
+ "bot_followup": "What would be helpful for you?"
1236
+ },
1237
+ {
1238
+ "user_input": "Tell me about yourself right now",
1239
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1240
+ "bot_followup": "What brings you here today?"
1241
+ },
1242
+ {
1243
+ "user_input": "Can you help me right now",
1244
+ "bot_response": "I'll do my best to support you. What do you need?",
1245
+ "bot_followup": "What kind of help are you looking for?"
1246
+ },
1247
+ {
1248
+ "user_input": "I need advice right now",
1249
+ "bot_response": "I'm here to help. What situation are you facing?",
1250
+ "bot_followup": "Tell me more about what's going on?"
1251
+ },
1252
+ {
1253
+ "user_input": "How are you today",
1254
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1255
+ "bot_followup": "What's on your mind today?"
1256
+ },
1257
+ {
1258
+ "user_input": "What can you do today",
1259
+ "bot_response": "I'm here to listen and support you through anything.",
1260
+ "bot_followup": "What would be helpful for you?"
1261
+ },
1262
+ {
1263
+ "user_input": "Tell me about yourself today",
1264
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1265
+ "bot_followup": "What brings you here today?"
1266
+ },
1267
+ {
1268
+ "user_input": "Can you help me today",
1269
+ "bot_response": "I'll do my best to support you. What do you need?",
1270
+ "bot_followup": "What kind of help are you looking for?"
1271
+ },
1272
+ {
1273
+ "user_input": "I need advice today",
1274
+ "bot_response": "I'm here to help. What situation are you facing?",
1275
+ "bot_followup": "Tell me more about what's going on?"
1276
+ },
1277
+ {
1278
+ "user_input": "How are you please",
1279
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1280
+ "bot_followup": "What's on your mind today?"
1281
+ },
1282
+ {
1283
+ "user_input": "What can you do please",
1284
+ "bot_response": "I'm here to listen and support you through anything.",
1285
+ "bot_followup": "What would be helpful for you?"
1286
+ },
1287
+ {
1288
+ "user_input": "Tell me about yourself please",
1289
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1290
+ "bot_followup": "What brings you here today?"
1291
+ },
1292
+ {
1293
+ "user_input": "Can you help me please",
1294
+ "bot_response": "I'll do my best to support you. What do you need?",
1295
+ "bot_followup": "What kind of help are you looking for?"
1296
+ },
1297
+ {
1298
+ "user_input": "I need advice please",
1299
+ "bot_response": "I'm here to help. What situation are you facing?",
1300
+ "bot_followup": "Tell me more about what's going on?"
1301
+ },
1302
+ {
1303
+ "user_input": "How are you",
1304
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1305
+ "bot_followup": "What's on your mind today?"
1306
+ },
1307
+ {
1308
+ "user_input": "What can you do",
1309
+ "bot_response": "I'm here to listen and support you through anything.",
1310
+ "bot_followup": "What would be helpful for you?"
1311
+ },
1312
+ {
1313
+ "user_input": "Tell me about yourself",
1314
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1315
+ "bot_followup": "What brings you here today?"
1316
+ },
1317
+ {
1318
+ "user_input": "Can you help me",
1319
+ "bot_response": "I'll do my best to support you. What do you need?",
1320
+ "bot_followup": "What kind of help are you looking for?"
1321
+ },
1322
+ {
1323
+ "user_input": "I need advice",
1324
+ "bot_response": "I'm here to help. What situation are you facing?",
1325
+ "bot_followup": "Tell me more about what's going on?"
1326
+ },
1327
+ {
1328
+ "user_input": "How are you right now",
1329
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1330
+ "bot_followup": "What's on your mind today?"
1331
+ },
1332
+ {
1333
+ "user_input": "What can you do right now",
1334
+ "bot_response": "I'm here to listen and support you through anything.",
1335
+ "bot_followup": "What would be helpful for you?"
1336
+ },
1337
+ {
1338
+ "user_input": "Tell me about yourself right now",
1339
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1340
+ "bot_followup": "What brings you here today?"
1341
+ },
1342
+ {
1343
+ "user_input": "Can you help me right now",
1344
+ "bot_response": "I'll do my best to support you. What do you need?",
1345
+ "bot_followup": "What kind of help are you looking for?"
1346
+ },
1347
+ {
1348
+ "user_input": "I need advice right now",
1349
+ "bot_response": "I'm here to help. What situation are you facing?",
1350
+ "bot_followup": "Tell me more about what's going on?"
1351
+ },
1352
+ {
1353
+ "user_input": "How are you today",
1354
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1355
+ "bot_followup": "What's on your mind today?"
1356
+ },
1357
+ {
1358
+ "user_input": "What can you do today",
1359
+ "bot_response": "I'm here to listen and support you through anything.",
1360
+ "bot_followup": "What would be helpful for you?"
1361
+ },
1362
+ {
1363
+ "user_input": "Tell me about yourself today",
1364
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1365
+ "bot_followup": "What brings you here today?"
1366
+ },
1367
+ {
1368
+ "user_input": "Can you help me today",
1369
+ "bot_response": "I'll do my best to support you. What do you need?",
1370
+ "bot_followup": "What kind of help are you looking for?"
1371
+ },
1372
+ {
1373
+ "user_input": "I need advice today",
1374
+ "bot_response": "I'm here to help. What situation are you facing?",
1375
+ "bot_followup": "Tell me more about what's going on?"
1376
+ },
1377
+ {
1378
+ "user_input": "How are you please",
1379
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1380
+ "bot_followup": "What's on your mind today?"
1381
+ },
1382
+ {
1383
+ "user_input": "What can you do please",
1384
+ "bot_response": "I'm here to listen and support you through anything.",
1385
+ "bot_followup": "What would be helpful for you?"
1386
+ },
1387
+ {
1388
+ "user_input": "Tell me about yourself please",
1389
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1390
+ "bot_followup": "What brings you here today?"
1391
+ },
1392
+ {
1393
+ "user_input": "Can you help me please",
1394
+ "bot_response": "I'll do my best to support you. What do you need?",
1395
+ "bot_followup": "What kind of help are you looking for?"
1396
+ },
1397
+ {
1398
+ "user_input": "I need advice please",
1399
+ "bot_response": "I'm here to help. What situation are you facing?",
1400
+ "bot_followup": "Tell me more about what's going on?"
1401
+ },
1402
+ {
1403
+ "user_input": "How are you",
1404
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1405
+ "bot_followup": "What's on your mind today?"
1406
+ },
1407
+ {
1408
+ "user_input": "What can you do",
1409
+ "bot_response": "I'm here to listen and support you through anything.",
1410
+ "bot_followup": "What would be helpful for you?"
1411
+ },
1412
+ {
1413
+ "user_input": "Tell me about yourself",
1414
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1415
+ "bot_followup": "What brings you here today?"
1416
+ },
1417
+ {
1418
+ "user_input": "Can you help me",
1419
+ "bot_response": "I'll do my best to support you. What do you need?",
1420
+ "bot_followup": "What kind of help are you looking for?"
1421
+ },
1422
+ {
1423
+ "user_input": "I need advice",
1424
+ "bot_response": "I'm here to help. What situation are you facing?",
1425
+ "bot_followup": "Tell me more about what's going on?"
1426
+ },
1427
+ {
1428
+ "user_input": "How are you right now",
1429
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1430
+ "bot_followup": "What's on your mind today?"
1431
+ },
1432
+ {
1433
+ "user_input": "What can you do right now",
1434
+ "bot_response": "I'm here to listen and support you through anything.",
1435
+ "bot_followup": "What would be helpful for you?"
1436
+ },
1437
+ {
1438
+ "user_input": "Tell me about yourself right now",
1439
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1440
+ "bot_followup": "What brings you here today?"
1441
+ },
1442
+ {
1443
+ "user_input": "Can you help me right now",
1444
+ "bot_response": "I'll do my best to support you. What do you need?",
1445
+ "bot_followup": "What kind of help are you looking for?"
1446
+ },
1447
+ {
1448
+ "user_input": "I need advice right now",
1449
+ "bot_response": "I'm here to help. What situation are you facing?",
1450
+ "bot_followup": "Tell me more about what's going on?"
1451
+ },
1452
+ {
1453
+ "user_input": "How are you today",
1454
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1455
+ "bot_followup": "What's on your mind today?"
1456
+ },
1457
+ {
1458
+ "user_input": "What can you do today",
1459
+ "bot_response": "I'm here to listen and support you through anything.",
1460
+ "bot_followup": "What would be helpful for you?"
1461
+ },
1462
+ {
1463
+ "user_input": "Tell me about yourself today",
1464
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1465
+ "bot_followup": "What brings you here today?"
1466
+ },
1467
+ {
1468
+ "user_input": "Can you help me today",
1469
+ "bot_response": "I'll do my best to support you. What do you need?",
1470
+ "bot_followup": "What kind of help are you looking for?"
1471
+ },
1472
+ {
1473
+ "user_input": "I need advice today",
1474
+ "bot_response": "I'm here to help. What situation are you facing?",
1475
+ "bot_followup": "Tell me more about what's going on?"
1476
+ },
1477
+ {
1478
+ "user_input": "How are you please",
1479
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1480
+ "bot_followup": "What's on your mind today?"
1481
+ },
1482
+ {
1483
+ "user_input": "What can you do please",
1484
+ "bot_response": "I'm here to listen and support you through anything.",
1485
+ "bot_followup": "What would be helpful for you?"
1486
+ },
1487
+ {
1488
+ "user_input": "Tell me about yourself please",
1489
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1490
+ "bot_followup": "What brings you here today?"
1491
+ },
1492
+ {
1493
+ "user_input": "Can you help me please",
1494
+ "bot_response": "I'll do my best to support you. What do you need?",
1495
+ "bot_followup": "What kind of help are you looking for?"
1496
+ },
1497
+ {
1498
+ "user_input": "I need advice please",
1499
+ "bot_response": "I'm here to help. What situation are you facing?",
1500
+ "bot_followup": "Tell me more about what's going on?"
1501
+ },
1502
+ {
1503
+ "user_input": "How are you",
1504
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1505
+ "bot_followup": "What's on your mind today?"
1506
+ },
1507
+ {
1508
+ "user_input": "What can you do",
1509
+ "bot_response": "I'm here to listen and support you through anything.",
1510
+ "bot_followup": "What would be helpful for you?"
1511
+ },
1512
+ {
1513
+ "user_input": "Tell me about yourself",
1514
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1515
+ "bot_followup": "What brings you here today?"
1516
+ },
1517
+ {
1518
+ "user_input": "Can you help me",
1519
+ "bot_response": "I'll do my best to support you. What do you need?",
1520
+ "bot_followup": "What kind of help are you looking for?"
1521
+ },
1522
+ {
1523
+ "user_input": "I need advice",
1524
+ "bot_response": "I'm here to help. What situation are you facing?",
1525
+ "bot_followup": "Tell me more about what's going on?"
1526
+ },
1527
+ {
1528
+ "user_input": "How are you right now",
1529
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1530
+ "bot_followup": "What's on your mind today?"
1531
+ },
1532
+ {
1533
+ "user_input": "What can you do right now",
1534
+ "bot_response": "I'm here to listen and support you through anything.",
1535
+ "bot_followup": "What would be helpful for you?"
1536
+ },
1537
+ {
1538
+ "user_input": "Tell me about yourself right now",
1539
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1540
+ "bot_followup": "What brings you here today?"
1541
+ },
1542
+ {
1543
+ "user_input": "Can you help me right now",
1544
+ "bot_response": "I'll do my best to support you. What do you need?",
1545
+ "bot_followup": "What kind of help are you looking for?"
1546
+ },
1547
+ {
1548
+ "user_input": "I need advice right now",
1549
+ "bot_response": "I'm here to help. What situation are you facing?",
1550
+ "bot_followup": "Tell me more about what's going on?"
1551
+ },
1552
+ {
1553
+ "user_input": "How are you today",
1554
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1555
+ "bot_followup": "What's on your mind today?"
1556
+ },
1557
+ {
1558
+ "user_input": "What can you do today",
1559
+ "bot_response": "I'm here to listen and support you through anything.",
1560
+ "bot_followup": "What would be helpful for you?"
1561
+ },
1562
+ {
1563
+ "user_input": "Tell me about yourself today",
1564
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1565
+ "bot_followup": "What brings you here today?"
1566
+ },
1567
+ {
1568
+ "user_input": "Can you help me today",
1569
+ "bot_response": "I'll do my best to support you. What do you need?",
1570
+ "bot_followup": "What kind of help are you looking for?"
1571
+ },
1572
+ {
1573
+ "user_input": "I need advice today",
1574
+ "bot_response": "I'm here to help. What situation are you facing?",
1575
+ "bot_followup": "Tell me more about what's going on?"
1576
+ },
1577
+ {
1578
+ "user_input": "How are you please",
1579
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1580
+ "bot_followup": "What's on your mind today?"
1581
+ },
1582
+ {
1583
+ "user_input": "What can you do please",
1584
+ "bot_response": "I'm here to listen and support you through anything.",
1585
+ "bot_followup": "What would be helpful for you?"
1586
+ },
1587
+ {
1588
+ "user_input": "Tell me about yourself please",
1589
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1590
+ "bot_followup": "What brings you here today?"
1591
+ },
1592
+ {
1593
+ "user_input": "Can you help me please",
1594
+ "bot_response": "I'll do my best to support you. What do you need?",
1595
+ "bot_followup": "What kind of help are you looking for?"
1596
+ },
1597
+ {
1598
+ "user_input": "I need advice please",
1599
+ "bot_response": "I'm here to help. What situation are you facing?",
1600
+ "bot_followup": "Tell me more about what's going on?"
1601
+ },
1602
+ {
1603
+ "user_input": "How are you",
1604
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1605
+ "bot_followup": "What's on your mind today?"
1606
+ },
1607
+ {
1608
+ "user_input": "What can you do",
1609
+ "bot_response": "I'm here to listen and support you through anything.",
1610
+ "bot_followup": "What would be helpful for you?"
1611
+ },
1612
+ {
1613
+ "user_input": "Tell me about yourself",
1614
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1615
+ "bot_followup": "What brings you here today?"
1616
+ },
1617
+ {
1618
+ "user_input": "Can you help me",
1619
+ "bot_response": "I'll do my best to support you. What do you need?",
1620
+ "bot_followup": "What kind of help are you looking for?"
1621
+ },
1622
+ {
1623
+ "user_input": "I need advice",
1624
+ "bot_response": "I'm here to help. What situation are you facing?",
1625
+ "bot_followup": "Tell me more about what's going on?"
1626
+ },
1627
+ {
1628
+ "user_input": "How are you right now",
1629
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1630
+ "bot_followup": "What's on your mind today?"
1631
+ },
1632
+ {
1633
+ "user_input": "What can you do right now",
1634
+ "bot_response": "I'm here to listen and support you through anything.",
1635
+ "bot_followup": "What would be helpful for you?"
1636
+ },
1637
+ {
1638
+ "user_input": "Tell me about yourself right now",
1639
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1640
+ "bot_followup": "What brings you here today?"
1641
+ },
1642
+ {
1643
+ "user_input": "Can you help me right now",
1644
+ "bot_response": "I'll do my best to support you. What do you need?",
1645
+ "bot_followup": "What kind of help are you looking for?"
1646
+ },
1647
+ {
1648
+ "user_input": "I need advice right now",
1649
+ "bot_response": "I'm here to help. What situation are you facing?",
1650
+ "bot_followup": "Tell me more about what's going on?"
1651
+ },
1652
+ {
1653
+ "user_input": "How are you today",
1654
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1655
+ "bot_followup": "What's on your mind today?"
1656
+ },
1657
+ {
1658
+ "user_input": "What can you do today",
1659
+ "bot_response": "I'm here to listen and support you through anything.",
1660
+ "bot_followup": "What would be helpful for you?"
1661
+ },
1662
+ {
1663
+ "user_input": "Tell me about yourself today",
1664
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1665
+ "bot_followup": "What brings you here today?"
1666
+ },
1667
+ {
1668
+ "user_input": "Can you help me today",
1669
+ "bot_response": "I'll do my best to support you. What do you need?",
1670
+ "bot_followup": "What kind of help are you looking for?"
1671
+ },
1672
+ {
1673
+ "user_input": "I need advice today",
1674
+ "bot_response": "I'm here to help. What situation are you facing?",
1675
+ "bot_followup": "Tell me more about what's going on?"
1676
+ },
1677
+ {
1678
+ "user_input": "How are you please",
1679
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1680
+ "bot_followup": "What's on your mind today?"
1681
+ },
1682
+ {
1683
+ "user_input": "What can you do please",
1684
+ "bot_response": "I'm here to listen and support you through anything.",
1685
+ "bot_followup": "What would be helpful for you?"
1686
+ },
1687
+ {
1688
+ "user_input": "Tell me about yourself please",
1689
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1690
+ "bot_followup": "What brings you here today?"
1691
+ },
1692
+ {
1693
+ "user_input": "Can you help me please",
1694
+ "bot_response": "I'll do my best to support you. What do you need?",
1695
+ "bot_followup": "What kind of help are you looking for?"
1696
+ },
1697
+ {
1698
+ "user_input": "I need advice please",
1699
+ "bot_response": "I'm here to help. What situation are you facing?",
1700
+ "bot_followup": "Tell me more about what's going on?"
1701
+ },
1702
+ {
1703
+ "user_input": "How are you",
1704
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1705
+ "bot_followup": "What's on your mind today?"
1706
+ },
1707
+ {
1708
+ "user_input": "What can you do",
1709
+ "bot_response": "I'm here to listen and support you through anything.",
1710
+ "bot_followup": "What would be helpful for you?"
1711
+ },
1712
+ {
1713
+ "user_input": "Tell me about yourself",
1714
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1715
+ "bot_followup": "What brings you here today?"
1716
+ },
1717
+ {
1718
+ "user_input": "Can you help me",
1719
+ "bot_response": "I'll do my best to support you. What do you need?",
1720
+ "bot_followup": "What kind of help are you looking for?"
1721
+ },
1722
+ {
1723
+ "user_input": "I need advice",
1724
+ "bot_response": "I'm here to help. What situation are you facing?",
1725
+ "bot_followup": "Tell me more about what's going on?"
1726
+ },
1727
+ {
1728
+ "user_input": "How are you right now",
1729
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1730
+ "bot_followup": "What's on your mind today?"
1731
+ },
1732
+ {
1733
+ "user_input": "What can you do right now",
1734
+ "bot_response": "I'm here to listen and support you through anything.",
1735
+ "bot_followup": "What would be helpful for you?"
1736
+ },
1737
+ {
1738
+ "user_input": "Tell me about yourself right now",
1739
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1740
+ "bot_followup": "What brings you here today?"
1741
+ },
1742
+ {
1743
+ "user_input": "Can you help me right now",
1744
+ "bot_response": "I'll do my best to support you. What do you need?",
1745
+ "bot_followup": "What kind of help are you looking for?"
1746
+ },
1747
+ {
1748
+ "user_input": "I need advice right now",
1749
+ "bot_response": "I'm here to help. What situation are you facing?",
1750
+ "bot_followup": "Tell me more about what's going on?"
1751
+ },
1752
+ {
1753
+ "user_input": "How are you today",
1754
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1755
+ "bot_followup": "What's on your mind today?"
1756
+ },
1757
+ {
1758
+ "user_input": "What can you do today",
1759
+ "bot_response": "I'm here to listen and support you through anything.",
1760
+ "bot_followup": "What would be helpful for you?"
1761
+ },
1762
+ {
1763
+ "user_input": "Tell me about yourself today",
1764
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1765
+ "bot_followup": "What brings you here today?"
1766
+ },
1767
+ {
1768
+ "user_input": "Can you help me today",
1769
+ "bot_response": "I'll do my best to support you. What do you need?",
1770
+ "bot_followup": "What kind of help are you looking for?"
1771
+ },
1772
+ {
1773
+ "user_input": "I need advice today",
1774
+ "bot_response": "I'm here to help. What situation are you facing?",
1775
+ "bot_followup": "Tell me more about what's going on?"
1776
+ },
1777
+ {
1778
+ "user_input": "How are you please",
1779
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1780
+ "bot_followup": "What's on your mind today?"
1781
+ },
1782
+ {
1783
+ "user_input": "What can you do please",
1784
+ "bot_response": "I'm here to listen and support you through anything.",
1785
+ "bot_followup": "What would be helpful for you?"
1786
+ },
1787
+ {
1788
+ "user_input": "Tell me about yourself please",
1789
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1790
+ "bot_followup": "What brings you here today?"
1791
+ },
1792
+ {
1793
+ "user_input": "Can you help me please",
1794
+ "bot_response": "I'll do my best to support you. What do you need?",
1795
+ "bot_followup": "What kind of help are you looking for?"
1796
+ },
1797
+ {
1798
+ "user_input": "I need advice please",
1799
+ "bot_response": "I'm here to help. What situation are you facing?",
1800
+ "bot_followup": "Tell me more about what's going on?"
1801
+ },
1802
+ {
1803
+ "user_input": "How are you",
1804
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1805
+ "bot_followup": "What's on your mind today?"
1806
+ },
1807
+ {
1808
+ "user_input": "What can you do",
1809
+ "bot_response": "I'm here to listen and support you through anything.",
1810
+ "bot_followup": "What would be helpful for you?"
1811
+ },
1812
+ {
1813
+ "user_input": "Tell me about yourself",
1814
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1815
+ "bot_followup": "What brings you here today?"
1816
+ },
1817
+ {
1818
+ "user_input": "Can you help me",
1819
+ "bot_response": "I'll do my best to support you. What do you need?",
1820
+ "bot_followup": "What kind of help are you looking for?"
1821
+ },
1822
+ {
1823
+ "user_input": "I need advice",
1824
+ "bot_response": "I'm here to help. What situation are you facing?",
1825
+ "bot_followup": "Tell me more about what's going on?"
1826
+ },
1827
+ {
1828
+ "user_input": "How are you right now",
1829
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1830
+ "bot_followup": "What's on your mind today?"
1831
+ },
1832
+ {
1833
+ "user_input": "What can you do right now",
1834
+ "bot_response": "I'm here to listen and support you through anything.",
1835
+ "bot_followup": "What would be helpful for you?"
1836
+ },
1837
+ {
1838
+ "user_input": "Tell me about yourself right now",
1839
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1840
+ "bot_followup": "What brings you here today?"
1841
+ },
1842
+ {
1843
+ "user_input": "Can you help me right now",
1844
+ "bot_response": "I'll do my best to support you. What do you need?",
1845
+ "bot_followup": "What kind of help are you looking for?"
1846
+ },
1847
+ {
1848
+ "user_input": "I need advice right now",
1849
+ "bot_response": "I'm here to help. What situation are you facing?",
1850
+ "bot_followup": "Tell me more about what's going on?"
1851
+ },
1852
+ {
1853
+ "user_input": "How are you today",
1854
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1855
+ "bot_followup": "What's on your mind today?"
1856
+ },
1857
+ {
1858
+ "user_input": "What can you do today",
1859
+ "bot_response": "I'm here to listen and support you through anything.",
1860
+ "bot_followup": "What would be helpful for you?"
1861
+ },
1862
+ {
1863
+ "user_input": "Tell me about yourself today",
1864
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1865
+ "bot_followup": "What brings you here today?"
1866
+ },
1867
+ {
1868
+ "user_input": "Can you help me today",
1869
+ "bot_response": "I'll do my best to support you. What do you need?",
1870
+ "bot_followup": "What kind of help are you looking for?"
1871
+ },
1872
+ {
1873
+ "user_input": "I need advice today",
1874
+ "bot_response": "I'm here to help. What situation are you facing?",
1875
+ "bot_followup": "Tell me more about what's going on?"
1876
+ },
1877
+ {
1878
+ "user_input": "How are you please",
1879
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1880
+ "bot_followup": "What's on your mind today?"
1881
+ },
1882
+ {
1883
+ "user_input": "What can you do please",
1884
+ "bot_response": "I'm here to listen and support you through anything.",
1885
+ "bot_followup": "What would be helpful for you?"
1886
+ },
1887
+ {
1888
+ "user_input": "Tell me about yourself please",
1889
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1890
+ "bot_followup": "What brings you here today?"
1891
+ },
1892
+ {
1893
+ "user_input": "Can you help me please",
1894
+ "bot_response": "I'll do my best to support you. What do you need?",
1895
+ "bot_followup": "What kind of help are you looking for?"
1896
+ },
1897
+ {
1898
+ "user_input": "I need advice please",
1899
+ "bot_response": "I'm here to help. What situation are you facing?",
1900
+ "bot_followup": "Tell me more about what's going on?"
1901
+ },
1902
+ {
1903
+ "user_input": "How are you",
1904
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1905
+ "bot_followup": "What's on your mind today?"
1906
+ },
1907
+ {
1908
+ "user_input": "What can you do",
1909
+ "bot_response": "I'm here to listen and support you through anything.",
1910
+ "bot_followup": "What would be helpful for you?"
1911
+ },
1912
+ {
1913
+ "user_input": "Tell me about yourself",
1914
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1915
+ "bot_followup": "What brings you here today?"
1916
+ },
1917
+ {
1918
+ "user_input": "Can you help me",
1919
+ "bot_response": "I'll do my best to support you. What do you need?",
1920
+ "bot_followup": "What kind of help are you looking for?"
1921
+ },
1922
+ {
1923
+ "user_input": "I need advice",
1924
+ "bot_response": "I'm here to help. What situation are you facing?",
1925
+ "bot_followup": "Tell me more about what's going on?"
1926
+ },
1927
+ {
1928
+ "user_input": "How are you right now",
1929
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1930
+ "bot_followup": "What's on your mind today?"
1931
+ },
1932
+ {
1933
+ "user_input": "What can you do right now",
1934
+ "bot_response": "I'm here to listen and support you through anything.",
1935
+ "bot_followup": "What would be helpful for you?"
1936
+ },
1937
+ {
1938
+ "user_input": "Tell me about yourself right now",
1939
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1940
+ "bot_followup": "What brings you here today?"
1941
+ },
1942
+ {
1943
+ "user_input": "Can you help me right now",
1944
+ "bot_response": "I'll do my best to support you. What do you need?",
1945
+ "bot_followup": "What kind of help are you looking for?"
1946
+ },
1947
+ {
1948
+ "user_input": "I need advice right now",
1949
+ "bot_response": "I'm here to help. What situation are you facing?",
1950
+ "bot_followup": "Tell me more about what's going on?"
1951
+ },
1952
+ {
1953
+ "user_input": "How are you today",
1954
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1955
+ "bot_followup": "What's on your mind today?"
1956
+ },
1957
+ {
1958
+ "user_input": "What can you do today",
1959
+ "bot_response": "I'm here to listen and support you through anything.",
1960
+ "bot_followup": "What would be helpful for you?"
1961
+ },
1962
+ {
1963
+ "user_input": "Tell me about yourself today",
1964
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1965
+ "bot_followup": "What brings you here today?"
1966
+ },
1967
+ {
1968
+ "user_input": "Can you help me today",
1969
+ "bot_response": "I'll do my best to support you. What do you need?",
1970
+ "bot_followup": "What kind of help are you looking for?"
1971
+ },
1972
+ {
1973
+ "user_input": "I need advice today",
1974
+ "bot_response": "I'm here to help. What situation are you facing?",
1975
+ "bot_followup": "Tell me more about what's going on?"
1976
+ },
1977
+ {
1978
+ "user_input": "How are you please",
1979
+ "bot_response": "I'm here and ready to listen. How are you doing?",
1980
+ "bot_followup": "What's on your mind today?"
1981
+ },
1982
+ {
1983
+ "user_input": "What can you do please",
1984
+ "bot_response": "I'm here to listen and support you through anything.",
1985
+ "bot_followup": "What would be helpful for you?"
1986
+ },
1987
+ {
1988
+ "user_input": "Tell me about yourself please",
1989
+ "bot_response": "I'm an AI therapist designed to provide emotional support.",
1990
+ "bot_followup": "What brings you here today?"
1991
+ },
1992
+ {
1993
+ "user_input": "Can you help me please",
1994
+ "bot_response": "I'll do my best to support you. What do you need?",
1995
+ "bot_followup": "What kind of help are you looking for?"
1996
+ },
1997
+ {
1998
+ "user_input": "I need advice please",
1999
+ "bot_response": "I'm here to help. What situation are you facing?",
2000
+ "bot_followup": "Tell me more about what's going on?"
2001
+ }
2002
+ ]
rag_knowledges/sadness.json ADDED
The diff for this file is too large to render. See raw diff