Inspiration
In the past year, we have been forced to adapt to a very different lifestyle. This has certainly brought the topic of mental health to the forefront. As students, we understand how difficult virtual learning can be. Often students simply need to talk about their feelings in a tangible way to better cope with stress and isolation. As a result, we have created a simple Chrome extension that will ask the user about their current feelings and respond with a message depending on the user's response.
What it does
The Chrome extension pops up on the user's Google home page and asks how they are feeling. The user will type their response and our backend app will apply natural language processing to determine the sentiment that the user is radiating. Our program determines a score between -1 and 1, which signifies how negative or positive a person is feeling. The score is used to output a useful message that can help the person cope or develop their feelings.
How we built it
The extension runs on a background and dialog JavaScript program that waits for the user to request to write a message before creating a new popup window that then uses a send-and-request messaging system to save the user’s input. Using fetch, the input was sent to the sentiment analysis endpoint and retrieved a sentiment score. Based on this score and a previous score, the user is given relevant advice. To analyze the user’s feelings, we used the Google Cloud Natural Language API to provide sentiment analysis. We built a Python Flask web service that allowed the client Chrome Extension to query the Google NLP API. The Flask app used NLTK to parse and clean up the user input and the Google Cloud Python API to query the NLP API.
Challenges we ran into
One of the biggest obstacles we faced was trying to store the user's data in hopes of providing personalized feedback in the form of advice. Storing the scores that a user receives, based on the sentiment analysis, locally proved difficult as the program would reset each time and the data would be lost. The storage issue also obstructed our initial goal of providing a visual that displayed the user's progress over time based on their sentiment scores. One of the solutions was using a database on Google Cloud to store our data. However, with the limited timeframe, we chose to focus on fixing bugs and tying up loose ends to create a complete project.
Accomplishments that we're proud of
Our biggest accomplishment was that we were able to find the perfect resources to help us design the Chrome extension that matched our vision. From Google Cloud's sentiment analysis to hosting our API, we sought out the perfect tools to match our needs. Also, this was the first hackathon for some of the team members so brainstorming an idea and developing it within 24 hours was an amazing accomplishment.
What we learned
There was a great deal to learn over these 24 hours. Initially, our research on mental health and how it has been impacted during the pandemic proved instrumental in deciding the end goal of the project. It was important to us that we realized the full extent of the issue that we were seeking to resolve. In addition, we learned how Google Cloud does its natural language processing to analyze sentiment within text. We also learned how to create a Chrome Extension, link it to an API, and host using a cloud service. The trial and error process of working with HTML was worthwhile since it lead to many new lessons learned about front-end development. In our exploration, we also came across a plethora of APIs related to natural language processing that can be useful to us in future projects.
What's next for You First
Our plan for expanding You First is to develop it for more browsers, such as Safari, Firefox, and Edge. In addition, we want to build a model that can learn from the pattern of a particular user's feeling and output personalized advice. This will enhance the user experience as well as produce better end results to help the user work through their feelings. Another aspect of You First that we want to add is an analytics portion of the extension using Chart.js to provide a visual representation of the user’s progress. This feature would show up as a button in the initial popup for the user to click that would open up another popup window that shows the line chart of the user’s sentiment scores day-by-day. We have also discussed the possibility of a You First mobile app, which can be much more accessible and more interactive for the user. It is imperative to us that the further development of this project focuses on the benefit of the end-user and the betterment of their mental stability.
Built With
- flask
- google-cloud
- google-cloud-sdk
- google-ml-api
- html
- javascript
- json
- natural-language-processing
- nltk
- python


Log in or sign up for Devpost to join the conversation.