0% found this document useful (0 votes)
91 views19 pages

Mental Wellness Chatbot

MentalWellness.AI is an AI-powered mental health application designed to provide personalized emotional support through journaling, sentiment analysis, and a conversational chatbot. It addresses gaps in current mental health solutions by offering continuous emotional tracking, personalized feedback, and secure user data management. The platform targets a growing market of individuals seeking accessible mental health resources, with a freemium model and potential institutional licensing for broader reach.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views19 pages

Mental Wellness Chatbot

MentalWellness.AI is an AI-powered mental health application designed to provide personalized emotional support through journaling, sentiment analysis, and a conversational chatbot. It addresses gaps in current mental health solutions by offering continuous emotional tracking, personalized feedback, and secure user data management. The platform targets a growing market of individuals seeking accessible mental health resources, with a freemium model and potential institutional licensing for broader reach.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

MENTAL WELLNESS.

AI
AI-Powered Mental Health Companion
PROBLEM STATEMENT:
Mental health is a growing concern worldwide, affecting individuals across age
groups, professions, and geographies. Despite increasing awareness, access to
timely, personalized, and affordable support remains limited. Traditional mental
health systems rely heavily on human professionals, are often cost-prohibitive,
and suffer from long wait times, especially in underserved areas.

People are often hesitant to open up in clinical settings due to stigma, while
those with mild to moderate symptoms frequently lack access to early
intervention tools. Emotional self-awareness, daily mental check-ins, and
journaling habits are proven to improve mental well-being — yet they are not
widely practiced due to lack of engaging tools.

To address this issue, we propose an AI-powered mental health application that


supports users through personalized journaling, emotional reflection, sentiment
analysis, and a conversational chatbot to simulate safe, empathetic
conversations.

PRESENT MARKET OVERVIEW:

Mental health is no longer a peripheral issue — it’s a global health priority. The
World Health Organization estimates that more than 280 million people suffer
from depression, and anxiety disorders affect nearly 1 in 3 adults. The post-
pandemic era has further highlighted the need for accessible mental health
solutions.

While telehealth therapy platforms like BetterHelp and Talkspace have gained
popularity, they primarily connect users to therapists — a resource still
expensive and time-restricted. On the other hand, apps like Headspace or Calm
focus largely on meditation and relaxation, offering limited emotional
interactivity or reflection.

Key Gaps in the Current Market:

 Lack of continuous emotional tracking tools that offer insights over time
 Limited personalization in chatbot or journaling apps
 No real-time emotional understanding of user’s journal content
 Lack of intelligent, supportive dialogue beyond static prompts

MentalWellness.AI fills this gap with a smart, AI-powered journaling + chatbot


experience tailored for emotion understanding and mood analytics.
PRODUCT INTRODUCTION:
MentalWellness.AI is a lightweight, AI-driven web application designed to act
as a 24/7 emotional support companion. It’s built to be secure, private, and
insightful — a digital space where users can reflect, chat, journal, and track
their mental health over time.

✅ Key Features:

1. Emotion-Aware Chatbot (Chatbot + TF-IDF/ML):


o Accepts long, journal-style user inputs
o Detects emotions using a trained TF-IDF + Logistic Regression
model
o Provides empathetic, contextual responses based on the detected
emotion (joy, sadness, anger, fear, etc.)
2. 📓 Smart Journaling with Emotion Feedback:
o Allows users to enter personal journal entries
o Each entry is analyzed for emotional tone and sentiment score
o Entries are saved with timestamps and emotion labels
3. 📊 Visual Mood Analytics Dashboard:
o Emotion Trend Line Chart: Track emotional shifts over time
o Radar Chart: Emotional balance
o Sentiment Trend Graph: Positivity/Negativity fluctuations
o Emotion Distribution Pie Chart: What emotions dominate
o Daily Mood Heatmap: Visualize daily mental health
4. 🔒 User Authentication System:
o Registration / Login system (with hashed passwords)
o All entries tied to a specific user (SQLite database)
5. 🌐 Resources Page:
o Curated list of therapy platforms (BetterHelp, Talkspace, 7 Cups)
o Journaling tools (Journey, Penzu)
6. 🎯 Optional Enhancements:
o Sentiment-based bot response variation
o Long-text support in emotion model
o Enhancement with Dialogflow for natural conversation
o Summary page: Most common emotion, sentiment average, days
tracked
BUSINESS NEED ASSESSMENT
I. MARKET DYNAMICS

Mental health has become a pressing public health issue across the globe.
According to the World Health Organization (WHO), more than 970 million
people globally suffer from a mental disorder, with depression and anxiety
being the most common. While professional therapy and counseling are
effective, they are not always accessible or affordable — particularly for
individuals in remote areas, students, or those without sufficient health
coverage.

The digital mental health market is growing at an accelerated pace, with an


estimated value of $5.2 billion in 2022 and a projected CAGR of over 20%
through 2030. This surge is fueled by:

 Increased mental health awareness, particularly post-COVID-19


 A younger, digitally native population turning to apps for emotional
support
 The proliferation of smartphones and high-speed internet access, even in
Tier 2 & 3 cities
 A cultural shift toward proactive self-care and emotional self-awareness

Furthermore, the growing adoption of reflective practices like journaling,


mindfulness, and mood tracking has revealed a user demand for intelligent
platforms that provide personalized and private emotional support — without
the cost or availability barriers of traditional therapy.

Key Market Observations:

 Over 1 in 5 adults report symptoms of depression or anxiety, yet fewer


than 40% receive treatment.
 70% of users abandon traditional mental health apps due to lack of
emotional resonance or utility.
 Mental health startups with integrated analytics and user journaling have
shown higher engagement and retention rates.

This presents a unique opportunity to design lightweight, intelligent tools that


bridge the emotional gap — not replace therapists, but supplement them with
daily check-ins, emotion tracking, and context-aware support.

II. KEY PAIN POINTS


Despite the rise of numerous mental wellness applications, several gaps persist
in how users experience and engage with these tools:

1. Users Feel Unsupported Between Therapy Sessions

 Traditional therapy sessions are scheduled weekly or bi-weekly.


 Users experience emotional turbulence between sessions with no
structured outlet to express or reflect on these feelings.
 Most journaling apps are passive — they record input, but provide no
intelligent feedback or analysis.

2. Existing Chatbots Are Rule-Based and Impersonal

 A majority of mental health chatbots operate on pre-defined rules or


decision trees.
 They lack contextual understanding and emotional nuance, often
providing generic or mechanical responses.
 Users quickly detect the artificiality, leading to disengagement.

3. Lack of Integrated Analytics and Self-Awareness Tools

 Few platforms offer visual feedback (mood charts, emotion summaries)


in a meaningful, interpretable format.
 Users are unable to track how their emotions evolve over time.
 Self-reflection becomes isolated rather than cumulative.

4. Trust and Privacy Concerns

 Users want platforms that are secure, locally stored (e.g., SQLite), and
give them full control of their data.
 Black-box AI tools that offer no explanation or visualization are often
distrusted.

III. BUSINESS REQUIREMENTS

To address these gaps and serve the unmet emotional wellness needs of
individuals, the following requirements are central to the design and
deployment of this product:

A. Intelligent Emotion Detection (Lightweight ML)

 Use TF-IDF + Logistic Regression for efficient, accurate emotion


classification.
 Support multi-class classification (e.g., joy, sadness, anger, fear, surprise,
love, neutral).
 Provide real-time inference for both chatbot and journaling modules.

B. Option for High-Resource NLP (RoBERTa Transformer)

 Allow modular upgrade to RoBERTa-based emotion detection for


cloud/enterprise versions.
 Ideal for users with access to GPUs or external APIs.

C. Secure and Scalable Platform

 Web-based UI using Flask or Streamlit.


 Modular codebase for future deployment on mobile (React Native,
Flutter).
 Secure user authentication with hashed credentials and session
management.
 Scalable SQLite or PostgreSQL backend depending on the environment.

D. Conversational Frontend (Optional Dialogflow Integration)

 Support integration with Dialogflow to enhance chatbot interactivity.


 Webhook backend routes powered by the same emotion model to ensure
consistent predictions.
 Enable emotion-based routing of responses with dynamic templates.

E. Visual Emotion Analytics Dashboard

 Line charts for mood trends over time


 Radar charts to measure emotional balance
 Pie charts and bar graphs for emotion frequency and sentiment
distribution
 Heatmaps of daily mood scores

F. Journaling and Mood Tracking

 Secure journaling interface with timestamped entries


 Automatic emotion and sentiment tagging
 Option to view and edit past entries
 Journal summaries per week/month

G. Extendability and Personalization

 Modular ML pipeline: easy to retrain models with new data


 User-customized reports and emotion summaries
 Future integrations: therapist dashboard, reminders, voice input

IV. STRATEGIC ADVANTAGE

By combining structured journaling, intelligent emotional classification,


empathetic chatbot dialogue, and visually insightful analytics in a single
lightweight platform — this product is positioned to serve a wide user base with
high impact and low overhead.

TECH STACK:
Frontend:

 HTML/CSS Templates (chat.html, login.html, dashboard.html)


 Streamlit (optional alternate UI)
 Chart.js for interactive visualizations

Backend:

 Flask or Streamlit app structure


 SQLite Database (secure, lightweight)
 Dialogflow integration for conversational intelligence

Machine Learning:

 TF-IDF Vectorizer + Logistic Regression for emotion classification


 LabelEncoder for label mapping
 TextBlob for sentiment scoring
 (Optionally upgradeable to RoBERTa model if needed)

💰 MONETIZATION POTENTIAL:

 Freemium Model:
o Free journaling, chatbot, and basic analytics
o Premium tier: Extended history, detailed reports, therapist
integrations
 Institutional Licensing:
o Colleges and corporates can offer this as part of employee/student
wellness packages
 Data-driven Insights:
o With user consent, aggregate emotion trends can help identify
broader mental health patterns (privacy-first)
📈 VALUE PROPOSITION:

 Always-available mental health companion


 Personalized emotional feedback and tracking
 Encourages positive self-reflection and self-care habits
 Lightweight, affordable, and extensible
 Emotional insights that evolve over time

🚀 DEPLOYMENT & USAGE:

Deployment Options:

 Replit: Lightweight deployment with SQLite + TF-IDF


 Streamlit Cloud: Streamlined UI with integrated chatbot + analytics
 Heroku / Render: Flask-based deployment for robustness

Steps to Use:

1. Register / Log in as a user


2. Chat with the AI bot or write a journal
3. View visual dashboards on the analytics page
4. Revisit journal history anytime
5. Get contextual responses and insights from emotion-aware system

ML MODEL DEVELOPMENT
The core of our Mental Wellness App is an Emotion Detection system — a
lightweight and effective machine learning model that classifies a user's written
message (e.g., journal entry or chatbot input) into one of several emotions like
joy, sadness, anger, love, or fear.

This emotion classification is what powers intelligent chatbot replies, mood


tracking, and analytics.

This section walks you through the step-by-step process we followed to build,
train, evaluate, and deploy the ML model — even if you’re new to machine
learning.

PHASE 1: Understanding the Problem

Our goal is to detect the underlying emotion expressed in free-form text (like
"I’m feeling really anxious today").
We treat this as a multi-class classification problem. This means we are
predicting one label (emotion) from several possible categories.

PHASE 2: Dataset Preparation

We used the publicly available Emotion Dataset from Kaggle: emotions-


dataset-for-nlp by Praveen Govi.

📦 Dataset Description:

 Columns: "text" and "label"


 Size: ~20,000 text samples
 Emotion classes: joy, sadness, anger, fear, love, surprise
 Each sample is a short sentence (often a tweet or journal-like entry)

We loaded the data using pandas and inspected its distribution to ensure balance
across classes.

Example:

text: "I am so happy today!"


label: "joy"

PHASE 3: Data Preprocessing

Text data is raw and needs to be cleaned before being used by a model.

Steps Taken:

 Lowercasing all text


 Removing extra spaces and newlines
 Removing special characters if needed
 Label Encoding: Converting emotion strings (e.g., "joy") into numbers
using sklearn’s LabelEncoder

We then split the data:

 Training Set (80%)


 Validation Set (10%)
 Test Set (10%)

PHASE 4: Feature Extraction using TF-IDF

Machines can’t understand text directly — we need to convert text into


numerical format.
We used TF-IDF (Term Frequency-Inverse Document Frequency), a classic
NLP technique that measures how important a word is in a sentence relative to
the entire dataset.

This was done using:

TF-IDF turns every sentence into a vector of numbers — a requirement for


model training.

PHASE 5: Model Training – Logistic Regression

We chose Logistic Regression as the classifier:

 Simple and interpretable


 Fast to train
 Great for baseline performance
 Works well with TF-IDF on text

This trains the model to learn patterns between words and emotion labels.

PHASE 6: Evaluation

We tested the model on the validation and test sets using classification report
and confusion matrix:

We checked:

 Accuracy
 Precision, Recall, F1-Score (per emotion class)
 Confusion matrix

The model achieved:

 ~88–90% accuracy
 Strong F1-scores across most classes (even imbalanced ones like
“surprise”)

This made it a great choice for real-time inference in our app.

PHASE 7: Saving the Model


To use this model in a web app, we save the following using joblib:

 tfidf_vectorizer.pkl — the vectorizer


 tfidf_logreg_emotion.pkl — the trained logistic regression model
 label_encoder.pkl — the encoder for converting numbers back to emotion
labels

import joblib

joblib.dump(tfidf, "tfidf_vectorizer.pkl")
joblib.dump(clf, "tfidf_logreg_emotion.pkl")
joblib.dump(le, "label_encoder.pkl")

PHASE 8: Inference Logic

We use these saved files to predict emotions when a user enters a message:

def predict_emotion(text):
vect = tfidf.transform([text])
pred = clf.predict(vect)[0]
emotion = label_encoder.inverse_transform([pred])[0]
return emotion

PHASE 9: Integration into App

The model is integrated into the Flask/Streamlit app using:

 Flask APIs or Streamlit logic


 Emotion-based chatbot reply generation
 Mood trend visualizations (pie charts, radar charts, line charts)

BONUS: RoBERTa Option

For advanced users, we also trained a transformer-based model (RoBERTa)


using Hugging Face Transformers.

Benefits:

 Higher accuracy
 Understands long-range context better

But: it's heavier (~500MB) and slower on CPU, so we made it optional.

PHASE 10: Why TF-IDF + Logistic Regression?


Pros:

✅ Lightweight — Runs fast on Replit, local systems

✅ Accurate — ~90% on test data

✅ Easy to maintain & update — retrain on new data anytime

✅ Transparent — Easy to debug and understand

BUSINESS MODEL & MONETIZATION STRATEGY


A. Executive Summary

The Mental Wellness App combines AI-driven emotion detection, journaling,


personalized chatbot support, and analytics to help users monitor and improve
their emotional well-being. It targets the growing global market of individuals
seeking affordable, accessible, and personalized mental health support outside
traditional therapy.

This section outlines how the app will generate sustainable revenue while
providing value to individuals, therapists, corporates, and mental wellness
institutions.

B. Value Proposition

What makes us unique?

 Emotion-aware AI Chatbot that "listens" — not just responds


 Visual mood/emotion analytics over time
 Smart journaling with emotion tagging and sentiment scoring
 Lightweight and privacy-conscious (no medical data required)
 Expandable via Dialogflow, APIs, and integration with therapist
dashboards

Target Users:

 Individual users seeking affordable emotional support


 Therapists/coaches needing between-session support tools
 Corporate HR departments for employee wellness
 Universities, schools, and wellness NGOs

C. Business Model (B2C + B2B SaaS Hybrid)


We adopt a hybrid model, targeting both individual consumers (B2C) and
organizations (B2B).

1. B2C – Freemium Model (Mobile/Web App)

Basic (Free Tier):

✅ AI chatbot support (limited per day)


✅ Basic emotion detection and journaling
✅ Weekly summary of mood/emotions

Premium ($4.99/month or ₹299/month):

✔ Unlimited journaling and chatbot access


✔ Advanced analytics (trends, radar, heatmaps)
✔ Personalized emotional insights
✔ RoBERTa-powered deeper emotional understanding
✔ Access to mental wellness content (audio reflections, prompts)

Lifetime Premium: ₹1,999 or $24.99 one-time

2. B2B – SaaS Licenses for Institutions

Offer organization-specific dashboards with anonymized, aggregated insights


(opt-in):

Corporate Wellness Package:

🎯 Employer gets a dashboard for sentiment trends, employee burnout markers

📈 Includes employee engagement surveys

🎯 ₹20,000/year or $249/year for teams up to 100 users

Mental Health Coaches / Therapists:

🎯 Therapist sees client emotion history (opt-in)

🎯 Integrates with scheduling platforms

🎯 ₹5,000/year or $59/year per therapist login

Academic Institutions:

🎯 Student mood tracking with crisis alert systems


🎯 Partner with universities, counseling centers

3. White-Labeled API Access

Developers and mental wellness startups can access our ML models via REST
API:

 POST /predict_emotion → returns emotion + confidence


 POST /analyze_journal → returns emotion + sentiment + suggestions

API Pricing:

 Free tier: 100 requests/month


 Paid: ₹999/month or $12.99 for 10K requests/month

D. Monetization Roadmap

Phase 1: MVP Launch

 Free version with journaling + emotion detection


 Premium tier with advanced charts and unlimited chatbot usage
 Launch on Streamlit Cloud and Replit for early access

Phase 2: Therapist & Coach Platform

 Add scheduling, insights dashboard


 Start therapist onboarding partnerships

Phase 3: Corporate SaaS & Analytics

 Mood insights for employee HR dashboards


 Well-being surveys, burnout indicators

Phase 4: API & Data-as-a-Service

 Provide emotion detection as a service for developers


 Use anonymized, aggregated data for research partnerships (with user
consent)

E. Cost Structure

 Model training and hosting (cloud or Replit)


 Developer time (initial + ongoing)
 UI/UX design and accessibility features
 Data privacy/legal consultation
 Marketing (SEO, influencer reviews, wellness blogs)

F. Go-to-Market Strategy

 Launch via Streamlit/Replit for freemium users


 Collaborate with therapists and influencers for trust
 Publish on wellness platforms (ProductHunt, Reddit)
 LinkedIn outreach to HR and wellness teams
 Partner with colleges for mental health drives

G. KPIs for Stakeholders

 Daily Active Users (DAU)


 Churn rate of journaling users
 Emotion diversity and engagement time
 Conversion rate to premium tier
 API call volume (B2D)
 Customer acquisition cost (CAC)
 Lifetime value (LTV)

H. Investor Pitch Summary

 Highly scalable SaaS and API-based model


 Addresses growing unmet emotional support need
 Optional RoBERTa model for high-end clients
 First-mover advantage in journaling + chatbot + analytics combo
 Emotion data platform has long-term research and B2B value

I. Risks & Mitigation

1. Privacy Concerns

 Strict opt-in systems and anonymization


 End-to-end encryption for user messages

2. Overdependence on ML

 Provide fallback rule-based support when model confidence is low

3. Saturation of wellness apps

 Focus on intelligent emotional insights, not just meditation/tracking

J. Conclusion
Our model provides consistent, scalable, and human-centric emotional support
— powered by AI but grounded in empathy. With accessible pricing, valuable
insights, and a modular architecture, we’re positioned to serve both individuals
and organizations in the growing mental health market.

FUTURE SCOPE OR ENHANCEMENTS:

I. USER-CENTRIC ENHANCEMENTS

1. Personalized Therapy Recommendations (AI Matching)

 Feature: Suggest coping strategies, exercises, or guided audio content


based on the user’s mood history.
 Example: If a user frequently expresses “anxiety,” recommend deep
breathing techniques or therapist-approved meditation audio.

2. Streaks & Daily Check-Ins

 Feature: Introduce gamification with mood tracking streaks and


reminders.
 Value: Keeps users engaged and builds a habit of self-reflection.

3. Conversational Journaling Prompts

 Feature: Bot proactively asks journaling questions like “What’s one thing
that made you smile today?”
 Value: Encourages users who struggle to start writing on their own.

4. Voice-Based Journaling

 Feature: Let users dictate journal entries using voice-to-text.


 Value: Especially helpful for users with limited literacy, accessibility
issues, or while driving.

5. Community or Peer Support (Optional)

 Feature: Allow users to join anonymous groups or share journal prompts


with friends.
 Value: Reduces isolation and builds a sense of support.

6. Crisis Mode & SOS Alerts

 Feature: If the user sentiment becomes extremely negative (e.g., suicidal


ideation), notify emergency contacts or provide helplines immediately.
 Value: Adds safety for at-risk users.

7. Calendar Integration & Mood Scheduling

 Feature: Let users visualize mood across work meetings, weekends, or


menstrual cycles.
 Value: Helps discover external emotional triggers.

8. Multilingual Support

 Feature: Detect emotion in regional or native languages (Hindi, Telugu,


etc.).
 Value: Expands user base beyond English speakers.

9. Mindfulness Audio / Journaling Library

 Feature: Unlock content based on emotion detected (e.g., “10 affirmations


for sadness”).
 Value: Curated content for self-healing.

10.Gratitude Bot Mode

 Feature: Daily prompt: “What’s something you’re grateful for today?”


 Value: Shown to improve mental health over time.

II. TECHNICAL / INFRASTRUCTURE ENHANCEMENTS

1. Dialogflow CX or GPT-4o Integration

 Upgrade to Dialogflow CX (for flow-based dialogue) or integrate GPT-


4o to handle open-ended, long conversations.
 Example: Let users vent fully, and the bot summarizes the emotion and
offers reflection questions.

2. Federated Learning or On-Device ML (Privacy-First)

 Run emotion prediction locally (on device) without sharing data to the
cloud.
 Value: Builds trust and is GDPR compliant.

3. Multi-Model Support (TF-IDF + RoBERTa + LSTM)

 Automatically choose between lightweight (TF-IDF) or deep (RoBERTa)


models based on resource availability.
 Example: Use TF-IDF for mobile and RoBERTa on desktop.
4. Continuous Learning with User Feedback

 Let users correct emotion predictions → use corrections to


retrain/improve model.
 Value: Personalized emotion detection per user over time.

5. Chat Summarization

 Use transformers to auto-summarize journal sessions.


 Value: “Last week you felt most productive on Wednesday, and low on
Friday.”

6. Emotion Calendar Heatmap with D3.js or Plotly

 Advanced visualizations: calendar heatmaps, emotion radar, pie chart per


week.
 Helps visualize mood swings with clarity.

7. Cloud Deployment (Docker + Kubernetes)

 Host on AWS/GCP with horizontal scaling and load balancing.


 Prepare for thousands of users without lag.

8. Therapist/Admin Dashboard (B2B Feature)

 Allow therapists to monitor their clients (with consent) through an


analytics panel.
 Export reports as PDF before sessions.

9. Sleep/Mood/Activity Sync (Fitbit, Apple HealthKit)

 Sync mood entries with physical data like heart rate or steps.
 Powerful correlation analysis (e.g., “You’re happier on days with >5K
steps”).

10.Sentiment Forecasting (Using Time Series)

 Predict future emotional states or burnout risks based on trendline.


 Useful for interventions and coaching.

III. SCALABILITY & MONETIZATION PATH

 Open API access for other wellness apps to plug into your emotion
engine
 Create plug-ins for MS Teams, Slack for workplace mental health
 White-label version for therapists or wellness coaches

You might also like