Inspiration

Depression is a common mental disorder. Globally, more than 264 million people of all ages suffer from depression. Depression is a leading cause of disability worldwide and is a major contributor to the overall global burden of disease. Depression can lead to suicide.

Although there are known, effective treatments for mental disorders, between 76% and 85% of people in low- and middle-income countries receive no treatment for their disorder. Barriers to effective care include a lack of resources, lack of trained health-care providers and social stigma associated with mental disorders. The burden of depression and other mental health conditions is on the rise globally.

Today, approximately 5% of male youth and 12% of female youth, age 12 to 19, have experienced a major depressive episode. By age 40, about 50% of the population will have or have had a mental illness.

Many of us have experienced feelings of sadness or anxiety. In those moments of loneliness, we all need friendly support. Someone to help us see past the dark cloud in our minds, check in on us, and point us towards helpful resources, that too free of cost and from the comforts of our homes. Happie Bot is here to help when there is no one else!

What it does

HappieBot is a Cognitive Behavioural Therapy based chatbot that is designed to help you go through moments of depression and anxiety. You can converse with Happie through text messages and let out how you feel; Happie will listen and recommend what you can do in the moment to feel better.

You can visit Happie at http://happiebot.pythonanywhere.com

How we built it

I am using twitter datasets freely available online in order to train a sentiment analysis model and then use Sentiment Analysis to find out if the user’s response is positive, neutral or negative, and thus decide the Happie's responses.

The neural network architecture for the sentiment analysis model consists of :

  1. An embedding layer with zero-masking to output word vectors of 32 dimensions for each word in the vocabulary, and a zero vector for zero-padded words.
  2. LSTM layer with 128 dimensional output.
  3. A fully connected output layer with 1 neuron and sigmoid activation function.

In this model, I am using binary cross-entropy loss function and the Adam optimizer with default parameters.

In order to predict the most relevant response by Happie, I have created a tree structure of questions to be asked and responses to be given by Happie, according to the result obtained after applying sentiment analysis to the user’s answer. In order to design this tree structure of questions, I have merged and integrated the concepts of Cognitive Behavioural Therapy.

Challenges we ran into

Designing a chatbot is difficulty, there are multiple therapeutic chatbots available online. However, HappieBot is built using an entirely unique algorithm. It uses the concepts of Cognitive Behavioural Therapy which has not been used in the past to train chatbots.

Accomplishments that we're proud of

I am proud that I was able to complete this project in such a short time duration.

What we learned

I learnt a lot about depression while developing this project.

What's next for HappieBot

I want to add more features to HappieBot like more resources and some prediction tests (may be).

Built With

Share this project:

Updates