https://github.com/sachin7123/mindguard
https://github.com/sachin7123/mindguard
bert-model nlp pushshift-api streamlit streamlitcloud textblob
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sachin7123/mindguard
- Owner: Sachin7123
- Created: 2025-06-29T21:07:49.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-29T22:34:36.000Z (10 months ago)
- Last Synced: 2025-06-29T23:26:51.588Z (10 months ago)
- Topics: bert-model, nlp, pushshift-api, streamlit, streamlitcloud, textblob
- Language: Python
- Homepage:
- Size: 272 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ง MindGuard โ Mental Health Sentiment Analyzer (Reddit NLP Dashboard)
MindGuard is an end-to-end, real-time NLP dashboard that monitors Reddit posts related to mental health. It uses both **TextBlob** and **BERT (Transformer)** models to detect signs of anxiety, depression, and emotional distress. Built with **Streamlit**, the dashboard offers sentiment comparison, filters, and rich visual analytics.

---
## ๐ง Project Motivation
> With rising mental health concerns globally, many people share their feelings anonymously online. By analyzing these expressions through natural language processing, MindGuard aims to assist researchers, moderators, or public health professionals in identifying signs of distress at scale.
---
## ๐ Features
- โ
Collects Reddit posts from mental health-focused subreddits
- โ
Cleans and fuses title + body text
- โ
Performs dual sentiment analysis using:
- **TextBlob** (lexicon-based)
- **BERT** (`cardiffnlp/twitter-roberta-base-sentiment`)
- โ
Filters posts by subreddit, model, or keywords
- โ
Visualizations: bar charts, pie charts, and summary cards
- โ
Highlights mismatches between TextBlob and BERT
- โ
Download the processed data as CSV
---
## ๐ป Tech Stack
| Layer | Tools Used |
| ------------- | ------------------------------------ |
| Frontend | Streamlit |
| NLP Models | TextBlob, Transformers (BERT) |
| Data Source | Reddit (via Pushshift API) |
| Processing | Python, Pandas, NumPy |
| Visualization | Streamlit, Matplotlib |
| Deployment | Streamlit Cloud |
| Storage | CSV (MongoDB optional for extension) |
---
## ๐งช How to Run Locally
```bash
git clone https://github.com/Sachin7123/mindguard.git
cd mindguard-nlp
python -m venv venv
# For Windows:
venv\Scripts\activate
# For macOS/Linux:
source venv/bin/activate
pip install -r requirements.txt
streamlit run app/dashboard.py
```