A lot of machine learning with NLP goes towards sentiment analysis or classification of text. We wanted to expand our Machine Learning skills into text generation purely because of how cool it is. Dad jokes are some of the funniest jokes too, so why not combine both.
What it does
The project is split into two parts, the website, and the Neural Network. When the button on the webpage is clicked
How we built it
The Neural Network was built using Google Colab and on a Joke dataset. This joke data was not very clean so several hours were spent cleaning it of potential hate or offensive speech. Then the dataset was cleaned again for specific words and those jokes were wiped from it just to be safe. Then the Neural Network was trained on the dataset using two LSTM layers with two dropout layers. Accuracy was certainly an issue as the Network produces nonsensical words and phrases. The webpage was designed with Flask which is a python framework for web dev. The webpage is also hosted on Google cloud!
Challenges we ran into
One of the first issues was the dataset. There were a lot of jokes that were unacceptable and a lot of offensive language. To solve some of that, we passed the dataset through a neural network to detect hate speech and offensive language. This still left a lot of bad jokes. To clean this, we went through every joke that contained a specific word and wiped that joke. Certain jokes still got through, but the language is cleaned before outputting to the user. Another issue was the Neural Network training. We quickly learned how difficult it is to have an accurate Neural Network when predicting characters. The Neural Network took between half an hour and 3 hours normally to train, so trying to lower the loss took a while. The best we were able to get it to is about 1.2. On the front end, our front-end developers did not have that much experience using Flask, HTML, and CSS. We also tried deploying the web app to cloud services like Microsoft Azure and Google Cloud, but ran into configuration issues since Flask is running in a virtual environment and did not know how this would run through a cloud workflow.
Accomplishments that we're proud of
We came in with no experience in any of these fields:
- Cleaning a dataset using both a Neural Network and string detection
- Learning Flask
- Uploading a website onto the cloud
- Learning to create a text generating Neural Network
What's next for Hi Hungry! I'm Dad
- Add a filter for jokes so users can get jokes on specific topics
- Lower the Loss for the Neural Network below 1.0