File size: 16,083 Bytes
c2d9599
 
 
 
 
 
061ee75
c2d9599
 
 
 
 
 
 
 
173df94
8f1759f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173df94
 
7f99840
3564336
7f99840
 
 
 
 
 
3564336
7f99840
 
3564336
7f99840
 
 
 
 
 
 
 
173df94
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
---
title: MindGuard AI
emoji: πŸ›‘οΈ
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.42.0
app_file: app.py
pinned: false
---

# MindGuard AI
(Your description starts here...)


<<<<<<< HEAD
<div align="center">

```
β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β•šβ•β•     β•šβ•β•β•šβ•β•β•šβ•β•  β•šβ•β•β•β•β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β•  β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•
```

### *When the mind needs a guardian, science answers the call.*

<br>

[![Python](https://img.shields.io/badge/Python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://python.org)
[![Streamlit](https://img.shields.io/badge/Streamlit-1.35+-FF4B4B?style=for-the-badge&logo=streamlit&logoColor=white)](https://streamlit.io)
[![HuggingFace](https://img.shields.io/badge/πŸ€—_HuggingFace-XLM--RoBERTa-FFD21E?style=for-the-badge)](https://huggingface.co)
[![Groq](https://img.shields.io/badge/Groq-LLaMA_3-F55036?style=for-the-badge)](https://groq.com)
[![SHAP](https://img.shields.io/badge/SHAP-Explainable_AI-008080?style=for-the-badge)](https://shap.readthedocs.io)
[![License](https://img.shields.io/badge/License-MIT-22C55E?style=for-the-badge)](LICENSE)

<br>

> **MindGuard** is a production-grade, multilingual mental health AI that doesn't just respond β€”  
> it *diagnoses*, *explains*, and *alerts*. Every word you type is analyzed by a fine-tuned  
> XLM-RoBERTa neural network, explained by Game Theory mathematics (SHAP),  
> and answered by a clinical-context-aware Groq LLM.

</div>

---

<br>

## β—ˆ What Makes This Different

Most mental health chatbots are wrappers around GPT. **MindGuard is not.**

| Capability | Generic Chatbot | **MindGuard** |
|---|---|---|
| Response generation | βœ… GPT/Claude API call | βœ… Groq LLaMA 3 with clinical system prompt |
| Emotion detection | ❌ Guessed from LLM output | βœ… Dedicated XLM-RoBERTa (35 emotions, fine-tuned) |
| Why did it predict that? | ❌ Black box | βœ… SHAP word-level attribution β€” mathematically proven |
| Risk escalation | ❌ None | βœ… High / Medium / Low triage with visual alerts |
| Multilingual | ❌ English only | βœ… 100+ languages via XLM-R architecture |
| Voice input | ❌ None | βœ… OpenAI Whisper transcription pipeline |
| Clinical audit trail | ❌ None | βœ… Full SQLite session history with timestamps |
| XAI dashboard | ❌ None | βœ… Clinician-facing SHAP HTML report viewer |

<br>

---

## β—ˆ System Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         USER INTERFACE LAYER                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚    πŸ’¬ Chat Companion      β”‚    β”‚   πŸ“Š Clinical Dashboard       β”‚   β”‚
β”‚  β”‚  β€’ Text input            β”‚    β”‚  β€’ Emotion frequency chart    β”‚   β”‚
β”‚  β”‚  β€’ Voice recording       β”‚    β”‚  β€’ Risk distribution chart    β”‚   β”‚
β”‚  β”‚  β€’ Emotion badge display β”‚    β”‚  β€’ Session history table      β”‚   β”‚
β”‚  β”‚  β€’ Risk badge display    β”‚    β”‚  β€’ πŸ”¬ SHAP report viewer      β”‚   β”‚
β”‚  β”‚  β€’ Inline SHAP report    β”‚    β”‚                               β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚ user input (text / audio)
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         PROCESSING LAYER                             β”‚
β”‚                                                                       β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚   β”‚   Whisper   │───▢│  XLM-RoBERTa     │───▢│   SHAP Engine    β”‚   β”‚
β”‚   β”‚  (audio β†’  β”‚    β”‚  Emotion Model   β”‚    β”‚  (Game Theory    β”‚   β”‚
β”‚   β”‚   text)    β”‚    β”‚  35 categories   β”‚    β”‚   attribution)   β”‚   β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                               β”‚ emotion + risk                        β”‚
β”‚                               β–Ό                                       β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚                    β”‚   Groq LLaMA 3 LLM   β”‚                          β”‚
β”‚                    β”‚  (clinical response  β”‚                          β”‚
β”‚                    β”‚   generation)        β”‚                          β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          PERSISTENCE LAYER                           β”‚
β”‚   SQLite DB (session history)    artifacts/shap_report.html          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

<br>

---

## β—ˆ The XAI Engine β€” Why This Matters

> *"Trust, but verify."* β€” Every prediction MindGuard makes can be traced back to the exact words that caused it.

MindGuard uses **SHAP (SHapley Additive exPlanations)** β€” a mathematically rigorous framework rooted in cooperative Game Theory β€” to answer:

**"Which specific words made the model predict *Anxiety* over *Depression*?"**

```
Input:  "I have a massive presentation tomorrow and my chest is tight."
                β”‚                    β”‚                        β”‚
                β–Ό                    β–Ό                        β–Ό
           [neutral]           [HIGH IMPACT]            [HIGH IMPACT]
           SHAP β‰ˆ 0.01         "presentation"           "chest is tight"
                               SHAP = +0.43              SHAP = +0.51
                                    β”‚                        β”‚
                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                               β–Ό
                                    Predicted: ANXIETY (87.3%)
                                    Risk Level: MEDIUM ⚠️
```

This is rendered as an **interactive HTML report** embedded directly in the chat β€” red highlights push the prediction *toward* the emotion, blue highlights push *against* it.

<br>

---

## β—ˆ Quick Start

### Prerequisites

```bash
python >= 3.10
```

### 1 Β· Clone & Install

```bash
git clone https://github.com/MohitParmar78/MindGuard-AI-Mental-Health-System.git
cd MindGuard-AI-Mental-Health-System
pip install -r requirements.txt
```

### 2 Β· Configure Secrets

Create a `.env` file at the project root:

```env
GROQ_API_KEY=your_groq_api_key_here
```

> Get your free Groq API key at [console.groq.com](https://console.groq.com)

### 3 Β· Ensure Model Weights Exist

The XLM-RoBERTa fine-tuned weights must be present at:

```
artifacts/
└── xlmr_weights/
    └── final_mindguard_model/
        β”œβ”€β”€ config.json
        β”œβ”€β”€ pytorch_model.bin
        β”œβ”€β”€ tokenizer_config.json
        └── vocab.json
```

> Train your own using the notebooks in `notebooks/` or download pretrained weights.

### 4 Β· Launch

```bash
cd app
streamlit run main.py
```

Navigate to `http://localhost:8501` in your browser.

<br>

---

## β—ˆ Project Structure

```
MindGuard-AI-Mental-Health-System/
β”‚
β”œβ”€β”€ πŸ“ app/                          ← Streamlit application
β”‚   β”œβ”€β”€ main.py                      ← Entry point, page routing
β”‚   β”œβ”€β”€ api.py                       ← Cached model loaders (@st.cache_resource)
β”‚   └── components/
β”‚       β”œβ”€β”€ chat_ui.py               ← Chat interface + SHAP + badge rendering
β”‚       └── dashboard_ui.py          ← Analytics + XAI report tab
β”‚
β”œβ”€β”€ πŸ“ src/                          ← Core business logic
β”‚   β”œβ”€β”€ chatbot/
β”‚   β”‚   └── groq_bot.py              ← Groq LLM orchestration + DB writes
β”‚   β”œβ”€β”€ explainability/
β”‚   β”‚   └── shap_explainer.py        ← XLM-R + SHAP pipeline β†’ HTML report
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   └── db_operations.py         ← SQLite CRUD operations
β”‚   └── audio/
β”‚       └── audio_processor.py       ← Whisper transcription wrapper
β”‚
β”œβ”€β”€ πŸ“ artifacts/                    ← Model weights + generated reports
β”‚   β”œβ”€β”€ xlmr_weights/
β”‚   β”‚   └── final_mindguard_model/   ← Fine-tuned XLM-RoBERTa (35 emotions)
β”‚   └── shap_report.html             ← Latest SHAP explanation (auto-generated)
β”‚
β”œβ”€β”€ πŸ“ data/
β”‚   └── raw/                         ← Temp audio files from voice input
β”‚
β”œβ”€β”€ πŸ“ notebooks/                    ← Training + experimentation notebooks
β”œβ”€β”€ requirements.txt
└── README.md
```

<br>

---

## β—ˆ Emotion & Risk Classification

### 35-Class Emotion Taxonomy

MindGuard classifies inputs across two merged ontologies:

**Clinical Diagnoses** (7 classes)

| Label | Severity | Risk Mapping |
|---|---|---|
| πŸ”΄ Suicidal | Critical | β†’ **HIGH** |
| πŸ”΄ Depression | Severe | β†’ **HIGH** |
| 🟠 Anxiety | Moderate–Severe | β†’ **MEDIUM–HIGH** |
| 🟠 Bipolar | Moderate–Severe | β†’ **MEDIUM–HIGH** |
| 🟠 Stress | Moderate | β†’ **MEDIUM** |
| 🟑 Personality Disorder | Varies | β†’ **MEDIUM** |
| 🟒 Normal | None | β†’ **LOW** |

**GoEmotions Fine-Grained** (28 classes) β€” admiration, amusement, anger, annoyance, approval, caring, confusion, curiosity, desire, disappointment, disapproval, disgust, embarrassment, excitement, fear, gratitude, grief, joy, love, nervousness, neutral, optimism, pride, realization, relief, remorse, sadness, surprise

<br>

---

## β—ˆ Technology Stack

| Layer | Technology | Why |
|---|---|---|
| **LLM** | Groq + LLaMA 3 | Ultra-low latency inference (<1s), free tier available |
| **Emotion Model** | XLM-RoBERTa (fine-tuned) | Multilingual, 100+ languages, state-of-art on NLP benchmarks |
| **Explainability** | SHAP `shap.Explainer` | Only mathematically rigorous word attribution framework |
| **Speech-to-Text** | OpenAI Whisper | Best-in-class accuracy, runs fully offline |
| **UI Framework** | Streamlit | Rapid ML app development, Python-native |
| **Database** | SQLite | Zero-config, portable, sufficient for session-scale data |
| **ML Utilities** | PyTorch, Transformers | Industry standard deep learning stack |

<br>

---

## β—ˆ Screenshots

> *(Replace the placeholder paths below with actual screenshots from your running app)*

| Chat Companion | Clinical Dashboard | SHAP Word-Level XAI |
|---|---|---|
| ![Chat](docs/screenshots/chat.png) | ![Dashboard](docs/screenshots/dashboard.png) | ![SHAP](docs/screenshots/shap.png) |

<br>

---

## β—ˆ Roadmap

- [x] XLM-RoBERTa 35-emotion fine-tuned classifier
- [x] SHAP word-level explainability with HTML report
- [x] Groq LLM integration with clinical system prompt
- [x] Whisper voice-to-text pipeline
- [x] SQLite audit trail + clinical dashboard
- [x] Real-time risk badge system (High / Medium / Low)
- [ ] RAG integration β€” retrieve clinical CBT strategies from knowledge base
- [ ] Multi-session memory with persistent user profiles
- [ ] Longitudinal mood tracking with trend analysis
- [ ] Crisis escalation workflow (auto-email / SMS alert)
- [ ] Docker containerization + cloud deployment (AWS/GCP)
- [ ] REST API layer for third-party EHR integration

<br>

---

## β—ˆ Ethical Disclaimer

```
╔══════════════════════════════════════════════════════════════════╗
β•‘  MindGuard is a research and portfolio demonstration project.    β•‘
β•‘  It is NOT a licensed medical device and is NOT a substitute     β•‘
β•‘  for professional mental health care.                            β•‘
β•‘                                                                  β•‘
β•‘  If you or someone you know is in crisis, please contact:        β•‘
β•‘  β€’ iCall (India):        9152987821                              β•‘
β•‘  β€’ Vandrevala Foundation: 1860-2662-345  (24x7)                  β•‘
β•‘  β€’ International:        findahelpline.com                       β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
```

<br>

---

## β—ˆ Author

<div align="center">

**Mohit Parmar**  
*B.Tech CSE Β· DIT University, Dehradun*  
*Data Science & ML Engineering*

[![GitHub](https://img.shields.io/badge/GitHub-MohitParmar78-181717?style=for-the-badge&logo=github)](https://github.com/MohitParmar78)

*Built with curiosity, caffeine, and an unreasonable belief that AI can make the world kinder.*

</div>

---

<div align="center">

*If this project helped you, a ⭐ on GitHub means more than you know.*

</div>
=======
---
title: MindGuard AI
emoji: πŸš€
colorFrom: red
colorTo: red
sdk: docker
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Streamlit template space
license: mit
---

# Welcome to Streamlit!

Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:

If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
forums](https://discuss.streamlit.io).
>>>>>>> 356433695c22e7cf0159fbc953d720d2de65b8c2