As mental health issues rise globally by 25%, social media platforms increasingly serve as emotional outlets for millions. 80% of teens express their struggles online, yet only 30% seek professional help. MoodGuard steps in by actively working towards bridging this gap between digital expression and real-life support.
MoodGuard is an AI-driven feature for social media that provides users with mental health resources after analyzing their posts. Using Natural Language Processing (NLP), it performs sentiment analysis and classifies content into Mental Health categories such as Depression, Anxiety, Suicidal, Bipolar, and Normal. Based on this analysis, a pop-up appears on the user’s screen, offering helplines, counselors, and educational resources, and even a fun customized Spotify playlist. This structure empowers users to seek help while allowing them to dismiss the message if they choose.
Our inspiration for this project comes from the need to make mental health resources more accessible. Social media is widely used, making it an effective platform for awareness. We focused on hidden mental health problems, noting that our team often turns to platforms like Twitter, Instagram, and Reddit in difficult times, leading us to explore sentiment analysis through NLP.
We developed our project using Google Colab for seamless collaboration. We sourced a dataset from Kaggle containing categorized phrases. After preprocessing the data to remove missing values, we split it into training and testing samples and tokenized it for numerical analysis. We trained the model using BERT, an open-source NLP framework adept at understanding ambiguous language. During testing, we monitored the model's accuracy, achieving 81% over three epochs. We implemented this model through a GUI model that takes in a user input and initiates a pop-up with mental health resources and a corresponding Spotify playlist based on the AI’s prediction of the mental health categories.
We faced challenges throughout this process, which we addressed through collaboration. For instance, we initially attempted vectorization with the column transformer but realized the tokenizer handled this efficiently. We also encountered RAM limitations when testing the model. Switching from CPU to GPU significantly improved processing. After consulting a mentor, we reduced our dataset from 50,000 entries to the first 5,000 lines for quicker training without losing accuracy.
Our product targets social media platforms, providing a service that offers users mental health resources based on sentiment analysis of their posts. By implementing MoodGuard, platforms can proactively support their users and raise awareness for those struggling in silence. We believe MoodGuard offers a discreet yet accessible way to encourage individuals to seek help when needed, free from pressure.
Built With
- csv
- google-drive
- googlecolab
- gradio
- huggingfacemodelhubapi
- kaggle
- pandas
- python
- pytorch
- regularexpressions
- scikit-learn
- softmaxfunction
- tensorflow
- transformers
Log in or sign up for Devpost to join the conversation.