An open API service indexing awesome lists of open source software.

https://github.com/11sshukla/mental_health_story_analyzer

This project is an AI-powered NLP pipeline that analyzes user-written stories to detect emotions.
https://github.com/11sshukla/mental_health_story_analyzer

ann artificial-intelligence deep-learning keras machine-learning nlp python streamlit tensorflow

Last synced: 4 months ago
JSON representation

This project is an AI-powered NLP pipeline that analyzes user-written stories to detect emotions.

Awesome Lists containing this project

README

          

# Mental_Health_Story_Analyzer
This project is an AI-powered NLP pipeline that analyzes user-written stories to detect emotions.
A powerful NLP-based tool designed to **analyze personal mental health stories**, detect the **underlying emotion**, identify **cognitive distortions**, and provide **supportive advice**. This project aims to combine **deep learning**, **rule-based logic**, and a **user-friendly Streamlit interface** to offer empathetic feedback and promote mental well-being.

## ๐Ÿ’ก Key Features

- ๐Ÿงพ **Emotion Detection** โ€” Uses a trained ANN model to classify emotions like joy, sadness, anger, etc.
- ๐Ÿง  **Cognitive Distortion Detection** โ€” Detects thought patterns (e.g., overgeneralization, catastrophizing) via rule-based or ML methods.
- ๐Ÿ’ฌ **Advice Generation** โ€” Offers constructive and supportive advice based on detected emotions.
- ๐ŸŽ›๏ธ **Interactive UI** โ€” Streamlit-based interface to enter, analyze, and visualize results in real time.

---

## ๐Ÿ“‚ Project Structure

mental-health-analyzer/
โ”œโ”€โ”€ app.py # Streamlit app (Frontend)
โ”œโ”€โ”€ Mental_Health_Story_Analyzer_model_pipeline.py # Core NLP + ML pipeline (Backend)
โ”œโ”€โ”€ emotion_model.h5 # Trained emotion classification model
โ”œโ”€โ”€ advice_model.h5 # Trained advice classification model
โ”œโ”€โ”€ tfidf_vectorizer.pkl # TF-IDF vectorizer for text features
โ”œโ”€โ”€ emotion_encoder.pkl # Label encoder for emotion labels
โ”œโ”€โ”€ advice_encoder.pkl # Label encoder for advice labels
โ”œโ”€โ”€ requirements.txt # List of required libraries
โ”œโ”€โ”€ README.md # Project documentation