Inspiration
We wanted to make something using machine learning. This is it.
What it does
Vibe Check uses a logistic regression model to perform sentiment analysis on incoming tweets. Based off of the perceived sentiment of those tweets, the background of the website changes.
How We built it
We used scikit-learn to create the logistic regression model for analyzing the emotional tone of our tweets. The model was trained on 10,000 tweets of training data before hand. Preprocessing of both training and test data involved the use of natural language toolkit in order to stem words in each tweet as well as getting rid of prepositions. We then used tweepy to access Twitter API to fetch one of the most recent tweets at any given time. This fetch function was then used in another class to constantly feed our model 15 new inputs every 15 seconds. From this, the model would compute average % happiness of the tweets in aggregate, which was then transmitted as a json string object on a Flask webpage. Our actual website would then use javascript's fetch() function to recieve this json string, and interpret it into an integer which it could use to calculate what color to display.
Challenges We ran into
Twitter API is pretty jank, it does not allow you to sample tweets without the use of a query and it limits your requests to 1 request/second. Due to this, we had to adjust our vision for our project as we became more aware of Twitter API's limitations. Additionally, we were relatively inexperienced with flask and javascript before this project, so the integration phase of our webtool posed many challenges.
Log in or sign up for Devpost to join the conversation.