Skip to content

Hackathon-LHP-Team/TedUp

Repository files navigation

TedUp

> Research Paper > Notebook & dataset > Video Demo > Pitching slide > All models

Acknowledgement

  • Mentor: Lê Nguyễn Thanh Huy (CoTAI - Center of Talent in AI)
  • We would like to thank our mentor Lê Nguyễn Thanh Huy (CoTAI - Center of Talent in AI) for valuable guidance from round 1 to round 3 (final round). He is more than just a mentor to us. He is an inspiration, a role model, and a friend. Special thanks to teacher Huy for sharing your wisdom and experience with us. You have taught us so much and motivated us to work hard and achieve our goals. We are so grateful for your mentorship and guidance

Feedback from Round 2 and solutions

  • UI is relatively dark $\rightarrow$ New clean minimal and more friendly UI
  • Virtual Therapist is not suitable $\rightarrow$ TedUp (TedupBot, TedupBlog, TedupPod)
  • Focus in the target audience (competitive advantage over Woebot and Wysa) $\rightarrow$ Released Vietnamese version for the chatbot, progess recorder, blogs, and podcasts
  • Leak of user information when the system uses info to analyze for the team to take action $\rightarrow$ Connect database between app and web for user can login and accept the term and condition
  • Categories for blog $\rightarrow$ 5 main categories and tags for each blog
  • Community building $\rightarrow$ reactions, comments, bookmarks
  • What's new?
    • Hybrid Recommender System = Neighborhood Collaborative Filtering + Content-based Filtering (with the help of Tags)
    • Cold Start problem $\rightarrow$ solved
    • New playlists of podcasts
    • Synced Database between App function and Web function (Bot can query the content from blogs to give advice to user)

LINK NEW VIDEO DEMO HERE

Abstract & introduction

Adolescents are facing various challenges to their mental health due to their exposure to online risks and pressures, such as cyberbullying, misinformation, social comparison, and unrealistic expectations. They also have to deal with the stress and anxiety from their academic and personal lives, which can affect their self- esteem and well-being. These factors can lead to negative emotions and behaviors, such as depression, isolation, self-harm, and substance abuse. Teenagers are reluctant to ask for help because of the stigma around mental health disorders, and there are also additional limitations including waiting lists and geographic restrictions. There is a significant gap in the treatment that should be available conveniently and cost-effectively, and the services available at hand. The ratio of therapists, psychiatrists, psychiatric social workers and mental health nurses to patients is 1: 10,000, even in developed countries (Kislay, 2020). The disparity in the system means that most people with menta health problems will never get the support the need. In response, we developed a technology-based application that provides online support and guidance to adolescents with mental health problems.

Approach

The application uses natural language processing and artificial intelligence to interact with users in a conversational manner, and offers a toolbox of features to help them cope with stress, anxiety, depression, and other challenges. The application also integrates mental health assessment tools to monitor the users’ progress and provide

feedback. We assume that technology-based applications can be a viable and scalable alternative to face-to-face mental health services for adolescents. Our solution consists of four main components:

  • A general emotion classifier that can categorize the user’s story (diary) into positive, negative, or neutral emotions, based on a deep neural network with bidirectional LSTM (BiLSTM) architecture. We evaluated our solution using a self-scraping dataset of online diaries from various websites. We compared different architectures and models for each component and selected the best ones based on their accuracy and performance.
  • A complex emotion classifier that can further classify the user’s story into 12 fine-grained emotion categories, such as anger, sadness, remorse, fear, depression, lonely, joy, love, optimism, gratitude, and pride. This component uses a transfer learning approach with BERT pretrained model to achieve better performance. The results from this step are then used to quantify the user’s mental health quality based on a our mathematical formula.
  • A chatbot that can respond to the user’s story with empathetic and supportive messages, and suggest some practical solutions to help them cope with their negative emotions and improve their well-being.
  • We have a time series analysis model that can predict the user’s future emotional trends based on their past diary entries. This component can help the user monitor their progress and identify potential risks or opportunities for intervention. (This feature need time to be improved)
  • Finally, there is a recommender system using neighbourhood collaborative filtering to suggest the best=fit blogs that can solve problems for users in a personalized way.

Explore the product's features

Q-system (Emotions Classifications and Q-value function)

View now

Recommender System (User-to-user collaborative filtering)

View now

Playlist Video Demo

Link to playlist

What's next

  • Expand the dataset to make the AI model more generalized and practical
  • Impove the time series for progess record analyis
  • Solve the "cold start" problem of the recommender system

How to run the code

First you need to clone this repository to your local system. Open terminal and then paste this command line

git clone https://github.com/Hackathon-LHP-Team/Virtual-Therapist.git

Next move into the cloned directory

cd Virtual-Therapist

Create a virtual environment with venv to avoid conflicts in library versions and modules

python -m venv .venv

Activate the environment

.\.venv\Scripts\activate

Install all neccessary libraries with a specific version

pip install -r requirements.txt

To run the server backend flask python, run this line of command

flask --debug run

Now, the website should be available at the port 127.0.0.1:5000

To run the streamlit app, move into the src folder

cd src

Now run the app with this command

streamlit run main.py

Code Structure

    ├───src
│   ├───assets
│   └───.streamlit
├───templates
├───.git
│   ├───hooks
│   ├───objects
│   │   ├───pack
│   │   └───info
│   ├───info
│   ├───refs
│   │   ├───tags
│   │   ├───remotes
│   │   │   └───origin
│   │   └───heads
│   └───logs
│       └───refs
│           ├───remotes
│           │   └───origin
│           └───heads
├───instance
├───Deep Learning training
│   └───model_v1.1
│       ├───dataset
│       ├───imgs
│       └───models
├───Research Papers
├───static
│   ├───imgs
│   ├───scss
│   ├───css
│   ├───js
│   └───vendor
│       ├───purecounter
│       ├───bootstrap
│       │   ├───css
│       │   └───js
│       ├───swiper
│       ├───glightbox
│       │   ├───css
│       │   └───js
│       ├───bootstrap-icons
│       │   └───fonts
│       └───typed.js
└───migrations
    └───versions