3
3
from datetime import datetime
4
4
from core .utils import create_new_conversation , get_current_time
5
5
from core .theme import get_current_theme , toggle_theme , set_palette , PALETTES
6
+
6
7
# --- Structured Emergency Resources ---
7
8
GLOBAL_RESOURCES = [
8
9
{"name" : "Befrienders Worldwide" , "desc" : "Emotional support to prevent suicide worldwide." ,
@@ -286,7 +287,7 @@ def render_sidebar():
286
287
for i , tab_title in enumerate (mental_health_resources_full .keys ()):
287
288
with resource_tabs [i ]:
288
289
topic_data = mental_health_resources_full [tab_title ]
289
- st .markdown (f"**{ tab_title } **" ) # fixed typo
290
+ st .markdown (f"**{ tab_title } **" )
290
291
st .info (topic_data ['description' ])
291
292
for link in topic_data ['links' ]:
292
293
st .markdown (f"• [{ link ['label' ]} ]({ link ['url' ]} )" )
@@ -336,22 +337,82 @@ def render_sidebar():
336
337
):
337
338
toggle_theme ()
338
339
339
- with st .expander ("ℹ️ About TalkHeal" ):
340
+ # Quizzes expander (no longer contains nested expander)
341
+ with st .expander ("🧪 Take PsyToolkit Verified Quizzes" ):
340
342
st .markdown ("""
341
- **TalkHeal** is your compassionate mental health companion, designed to provide:
342
-
343
- • 24/7 emotional support
344
- • Resource guidance
345
- • Crisis intervention
346
- • Professional referrals
347
-
348
- **Remember:** This is not a substitute for professional mental health care.
349
-
350
- ---
343
+ Explore scientifically backed quizzes to better understand your mental well-being. These tools are for **self-awareness** and not clinical diagnosis.
344
+ """ )
351
345
352
- **Created with ❤️ by [Eccentric Explorer](https://eccentriccoder01.github.io/Me)**
346
+ quizzes = [
347
+ {
348
+ "name" : "GAD-7 (Anxiety Assessment)" ,
349
+ "desc" : "Measures severity of generalized anxiety symptoms." ,
350
+ "url" : "https://www.psytoolkit.org/cgi-bin/3.6.0/survey?s=u8bAf" ,
351
+ "score_info" : """
352
+ Score Interpretation:
353
+ GAD-7 score runs from 0 to 21
354
+ - 0–4: Minimal anxiety
355
+ - 5–9: Mild anxiety
356
+ - 10–14: Moderate anxiety
357
+ - 15–21: Severe anxiety
358
+ """
359
+ },
360
+ {
361
+ "name" : "PHQ-9 (Depression Assessment)" ,
362
+ "desc" : "Screens for presence and severity of depression." ,
363
+ "url" : "https://www.psytoolkit.org/cgi-bin/3.6.0/survey?s=Hj32b" ,
364
+ "score_info" : """
365
+ Score Interpretation:
366
+ - 0–4: Mild depression
367
+ - 5–9: Moderate depression
368
+ - 10–14: Moderately severe depression
369
+ - 15–19: Severe depression
370
+ """
371
+ },
372
+ {
373
+ "name" : "The WHO-5 Well-Being Index" ,
374
+ "desc" : "Five simple non-intrusive questions to assess well-being. Score ranges from 0 (poor) to 100 (excellent)." ,
375
+ "url" : "https://www.psytoolkit.org/cgi-bin/3.6.0/survey?s=POqLJ" ,
376
+ "score_info" : """
377
+ Score Interpretation:
378
+ -if your score is 50 or lower you should consider
379
+ -further checks on whether you suffer
380
+ -from clinical depression
381
+ """
382
+ },
383
+ {
384
+ "name" : "Depression Anxiety Stress Scales (DASS)" ,
385
+ "desc" : "Measures depression, anxiety, and stress using one combined questionnaire." ,
386
+ "url" : "https://www.psytoolkit.org/cgi-bin/3.6.0/survey?s=HvfDY" ,
387
+ "score_info" : "**Score Interpretation (per subscale):**\n \n - **Normal, Mild, Moderate, Severe, Extremely Severe**\n \n | | Depression | Anxiety | Stress |\n |----------|------------|---------|---------|\n | Normal | 0-9 | 0-7 | 0-14 |\n | Mild | 10-13 | 8-9 | 15-18 |\n | Moderate | 14-20 | 10-14 | 19-25 |\n | Severe | 21-27 | 15-19 | 26-33 |\n | Extremely Severe | 28+ | 20+ | 34+ |"
388
+ }
389
+ ]
353
390
354
- *"It's absolutely okay not to be okay :)"*
391
+ for quiz in quizzes :
392
+ st .markdown (f"""
393
+ **{ quiz ['name' ]} **
394
+ *{ quiz ['desc' ]} *
395
+ [🔗 Take Quiz]({ quiz ['url' ]} )
396
+ { quiz ['score_info' ]}
397
+ """ )
355
398
356
- 📅 Enhanced Version - May 2025
357
- """ )
399
+ # About section moved outside of any expander
400
+ st .markdown ("---" )
401
+ st .markdown ("""
402
+ **ℹ️ About TalkHeal**
403
+ Your compassionate mental health companion, designed to provide:
404
+
405
+ • 24/7 emotional support
406
+ • Resource guidance
407
+ • Crisis intervention
408
+ • Professional referrals
409
+
410
+ **Remember:** This is not a substitute for professional mental health care.
411
+
412
+ ---
413
+
414
+ **Created with ❤️ by [Eccentric Explorer](https://eccentriccoder01.github.io/Me)**
415
+ *"It's absolutely okay not to be okay :)"*
416
+
417
+ 📅 Enhanced Version - May 2025
418
+ """ )
0 commit comments