-
The page that displays the positive tweets found
-
The page that displays the negative tweets found
-
With the negative tweets, there is also an option to Shred a Tweet
-
A Tweet is printed out directly into a shredder
-
The setup we have for the tweets to go into the shredder
-
Another option to avoid negativity is to look at Cute Animal pictures
-
This feed is connected the @CuteEmergency for their feed
Inspiration
While social media can be a good thing, its negative impact cannot be understated. This creates an ideal environment for predators of all kinds to spread their negativity internationally. Our goal with this project was to create an escape from this toxicity and provide a platform specifically designed to spread positivity while also having some fun.
What it does
The HateBad initiative accomplishes three main tasks. One, we use the power of Deep Learning to create a model able to categorize tweets as positive, neutral, or negative/hateful. We then take this output and display a collection of positive tweets in our website. The website also allows the user to print out a random negative/hateful tweet, which will subsequently be shredded, symbolizing the breaking down of this harmful mindset this project aims to accomplish.
How we built it
After finding two data sets containing presorted hate speech and presorted positive/negative tweets, we parsed the raw data into a MongoDB for easy and quick access by our machine learning models. After sanitizing input, we used TensorFlow to create and train two separate models, one for each data set, to categorize a tweet as hateful/negative or positive. We then exported the trained models for use in production. Using the Twitter API, we created a tweet stream to funnel new tweets to the trained models, which would in turn give a pandas dataframe consisting of the tweet and its categorization. The program would then go through the dataframe and like tweets that were categorized as hateful/negative while retweeting the ones that were considered positive tweets under our twitter account "@hate_no_good". On the website back end, a js script would hook into the twitter account and display any retweeted tweets on the website. There is also a negativity-mode page in which you are able to print one of the liked or hateful/negative posts which would then get printed to a printer configuration that immediately feeds the paper into a shredder, providing unreasonable amounts of positive thoughts and satisfaction. There is also a feed for cute animals in case of an emergency.
Challenges we ran into
The Model The hardest part of the project was defiantly getting two neural networks up and running. We initially tried to use the TensorFlow estimator toolkit. After training one of our data sets, we were able to get a fairly good categorization rate, but we were unable to pull useful information from the generator that the model output. For some reason the generator wouldn't act as a normal python generator and error out any time we tried to iterate over it. We solved this by scrapping the estimator model and electing for a traditional TensorFlow model, which after some painful data normalization, worked like a charm.
The Website Unfortunately, we were unable to host our website with a domain on domain.com so for now it is a local site on our computers. We did not have the time nor resources to figure out how to host the site in the allotted 24hrs.
Accomplishments that we're proud of
The biggest accomplishment has to be the fact that this project does actually work. Going into this, none of us had messed with Deep Learning AI so we figured that the probability of us actually creating a usable product was very small. After a very long and painful night, however, we finally managed to get a reasonable categorization schema that exceeded our expectations.
What we learned
While it was interesting to learn how to work with this level of AI, we learned that it really is not for us. While being a cool branch of CS, machine learning with neural networks is not the most exhilarating activity out there.
On the plus side we did get experience with a powerful toolkit, TensorFlow, and a convenient and easy to use database in MongoDB.
What's next for HateBad
While reasonable, the model for categorizing tweets is far from perfect. In the future we intend to optimize the model so as to minimize the false positive and categorization that occurs. We also would like to make the site public to the internet for the public to enjoy and use.
Log in or sign up for Devpost to join the conversation.