AI-powered therapy session summarizer — upload a therapy transcript and get a structured SOAP note plus an interactive emotion timeline chart.
Therapists spend significant time writing clinical notes after sessions. MindMapper automates this by generating structured SOAP (Subjective, Objective, Assessment, Plan) notes and visualizing emotional patterns across a session — all running locally with no data sent to external APIs.
┌─────────────────────────────────────────────────────┐
│ Gradio UI (ui.py) │
│ ┌──────────────┐ ┌────────────┐ ┌──────────────┐ │
│ │ Transcript │ │ SOAP Note │ │ Emotion │ │
│ │ Input │ │ (Markdown) │ │ Timeline │ │
│ │ (.txt/paste) │ │ │ │ (Plotly) │ │
│ └──────┬───────┘ └─────▲──────┘ └──────▲───────┘ │
└─────────┼────────────────┼─────────────────┼─────────┘
│ │ │
▼ │ │
┌─────────────────┐ ┌─────┴───────┐ ┌─────┴────────┐
│ model.py │ │ soap.py │ │ emotions.py │
│ Mistral-7B │◄─┤ SOAP │ │ Emotion │
│ 4-bit QLoRA │◄─┤ Generation │ │ Extraction │
│ + LoRA adapter │ │ + Parsing │ │ + Plotly │
└─────────────────┘ └─────────────┘ └──────────────┘
▲
│ (optional fine-tune)
┌─────────┴─────────────────────────┐
│ training/ │
│ train.py + dataset.py + config │
│ QLoRA fine-tuning pipeline │
└───────────────────────────────────┘
git clone https://github.com/NotArnav03/mindmapper.git
cd mindmapper
pip install -r requirements.txt
python -m app.uiSee notebooks/COLAB_GUIDE.md for step-by-step instructions.
python -m app.uiThis launches a web interface where you can:
- Paste a therapy transcript or upload a
.txtfile - Click "Analyze Session" to generate a SOAP note and emotion timeline
- View the structured SOAP note in markdown format
- Explore the interactive emotion timeline chart
- Access raw SOAP data in JSON format
python training/train.pyThis runs QLoRA fine-tuning with the config in training/config.yaml. The adapter is saved to ./lora_adapter and automatically loaded on next model start.
| Operation | VRAM Usage | Time |
|---|---|---|
| Model load (4-bit) | ~5 GB | 3-4 min |
| SOAP inference | ~7 GB peak | 15-30 sec |
| Emotion extraction (5 chunks) | ~7 GB peak | 60-90 sec |
| Fine-tuning (batch=2, grad_accum=4) | ~12 GB peak | ~45 min |
## Subjective
- Patient reports intense work stress with multiple overlapping deadlines
- Describes crying episode in parking lot after working until midnight
- Reports impostor syndrome feelings that intensify with sleep deprivation
- Acknowledges difficulty relaxing and guilt around non-productive activities
## Objective
- Patient appears fatigued but engaged in session
- Shows emotional awareness when connecting sleep patterns to negative self-talk
- Demonstrates willingness to try behavioral interventions
## Assessment
- Work-related anxiety with significant impact on sleep quality
- Impostor syndrome exacerbated by chronic sleep deprivation
- Self-worth heavily tied to productivity — pattern recognized by patient
- Notable progress in self-awareness compared to 6 months ago
## Plan
- Replace phone-checking with 4-7-8 breathing on 2 nights this week
- Observe morning self-talk patterns following breathing exercises
- Follow-up next Thursday to review sleep intervention outcomes
- Consider structured relaxation techniques in future sessions- Model: Mistral-7B-Instruct-v0.2 with 4-bit quantization
- Fine-tuning: QLoRA via PEFT + bitsandbytes
- Training: TRL SFTTrainer
- UI: Gradio
- Visualization: Plotly
- Data: HuggingFace Datasets