Inspiration

Suicide has been claiming millions of lives across the globe, and the evils of depression and anxiety have spared nobody, starting from celebrities to school students. Recently, Indian cinema lost one of its most beloved actors to depression and anxiety which brought up the issue of mental health all around the country and what steps can be taken to fight depression. This led us to build a chatbot that can get the users medical help when required, keep its users entertained and engaged, motivate them towards enjoying life and eradicate loneliness by connecting to others willing to help.

What it does

Our chatbot leverages Messenger's features to provide a unique Messaging experience with the following features:

User interface

  • User mood detection using Wit.ai
  • Built-in-NLP and Wit.ai to build a human-like conversation.
  • Schedule appointments with therapists as per their available slots
  • Reminder for appointments when the user asks to be reminded using One-Time Notification.
  • Live conversation with the therapist in the assigned slot to seek professional help
  • Suicidal response detection and immediate appointment scheduling with a therapist
  • Sharing of suicide prevention helpline number on detecting suicidal intent
  • Live conversation between two users maintaining complete anonymity using Personas.
  • Hate speech detection using user-to-user convo using Wit.ai and immediate reporting to the admins.
  • Option to report and block a user in case of misbehavior and present the issue via live chat with the admins using the Handover Protocol.
  • Conversation timeout in case of chat suspension for more than 5 minutes.
  • Disable sending of email id, phone numbers, and addresses between two users.
  • Disable attachment sharing to prevent sharing personal images etc.
  • Point-based system to judge user misbehavior using chats with other users. Users with very high scores get blocked temporarily.
  • Partner rating after the conversation ends.
  • Meme suggestions and display in Messenger
  • Joke suggestions that learn to adapt to user likes and dislikes based on the user's rating on each joke.
  • Motivational quote suggestions
  • Motivational video suggestions
  • Yoga and meditation suggestions in case of depression
  • Music suggestions from Spotify

We have taken special care to respect user privacy using the following approaches:

  • Complete anonymity of usernames is maintained between two users when they are communicating with each other.
  • Complete anonymity of profile pictures is maintained between two users when they are communicating with each other.
  • Hate speech is detected using Wit.ai during user-to-user conversation and reported to the admins.
  • Email addresses, phone numbers, and addresses cannot be shared between two users.
  • Option to report a user and present the issue directly to the admins via live chat.
  • No personal info is demanded from the user at any point in time.

Psych interface

  • Display schedule of appointments for the day
  • Live conversation with the patient in the allotted slot.

How we built it

  • Messenger Platform, with Flask for backend
  • MongoDB Atlas to host our Database (stores user states, prefences, appointment slots, blocked users)
  • Heroku to host our application
  • Wit.ai and Built-in-NLP to ensure human-like speech
  • Handover Protocol (live chat to report another user to the admins)
  • One-time notification (to send reminders for appointments)
  • Personas (to maintain anonymity of username and profile pictures during conversation)
  • Quick replies to handle user responses in multiple scenarios(reminder slots, user rating to attachments etc.)
  • Templates (media, call button, list, button templates)
  • Built-in NLP to handle greetings as well as sensitive data like emails, phone numbers, location
  • Wit.ai to detect user mood and understands what the user wants the bot to do
  • apscheduler library to connect users with therapists at the appointed time, to remind before appointments, and also to disconnect users in the live chat on chat suspension.
  • Pktriot to test our application locally
  • Git and GitHub for version control

Challenges we ran into

  • One of the biggest challenges we faced was using MongoDB Atlas for hosting the database as testing the application locally through Pktriot took a long time to connect to the database after every restart of the server.
  • Since there were 2 developers collaborating was hard with both developers living miles away as it brought up challenges while testing locally. We used 2 local servers and had to change the callback URL each time for testing the app.
  • Being beginners in app development we had no experience with hosting applications online and online-hosted database services.
  • It took time to find out APIs that would respect user privacy and not require paid subscriptions.
  • Given our application deals with a sensitive issue and involves interaction among multiple users, we had to come up with innovative approaches to respect user privacy.

Accomplishments that we're proud of

  • We have been able to come up with a chatbot that attacks a burning problem in today's society and can help users from falling prey to the monsters of depression, anxiety, and suicide.
  • We are happy that our chatbot can target a wide audience.
  • We have been able to build human-like conversation using Wit.ai and Built-in NLP knowing very little about the Deep Learning framework that went into building the Wit.ai platform.
  • We have built an anonymous P2P chat within Messenger that respects user privacy, complete with reporting and blocking features as well as hate-speech detection to prevent misbehavior.
  • We have been able to connect users with therapists within Messenger itself without using any third-party application and enable live conversation between them.

What we learned

  • Learned to leverage Facebook features to build an interactive Messenger Bot.
  • Learned to train NLP models using Wit.ai
  • Learned about different user privacy policies and built innovative solutions to respect user safety.

What's next for Cheerio

  • Using localization to facilitate offline meetings with therapists and accept payment for them.
  • Training a better and bigger model on Wit.ai to detect user intents and hate speech in a better manner.
  • Using Machine Learning to build a recommender system for jokes, music, video suggestions.

Built With

Share this project:

Updates