enzoampil / tito-joker

A humorous AI that uses state-of-the-art deep learning to tell jokes
http://35.225.94.177:8501/
GNU General Public License v3.0
45 stars 5 forks source link

Hi, I am Tito Joker! :wave: :grinning:

License: GPL v3 Build Status Website Code style: black

A humorous AI that uses state-of-the-art deep learning to tell jokes

Tito Joker aims to understand humor well enough to tell jokes that are actually funny. All you have to do is input a riddle type question and he tells a joke using it. He still has a long way to go but we will get there!

Interact with Tito Joker on this website and check out his medium article!

Generate GIFs automatically

Turned off by default - turn on from left sidebar

Tell multiple jokes from a single input

Tito Joker can give unique responses to the same input

Joke rating system

Help Tito Joker improve his humor by giving him feedback!

Methodology

Architecture

Fine-tuned version of the recently released OpenAI GPT-2 model with a left-to-right language modeling training objective. Similar hyperparameters were used from the original paper.

Data

A jokes dataset from Kaggle was used for fine-tuning. Aside from the original preprocessing, additional special tokens were added to allow the model to understand the difference between the "question" and "answer" components of a riddle type joke.

Warning: the dataset contains NSFW jokes, so Tito Joker's humour will also reflect jokes of this nature.

Preparing the data

python ./src/utils/process_jokes.py shortjokes.csv ./data/riddle_jokes.txt

Training the model

Please refer to the experiment notebooks.

Note: The number at the end of the notebook's filename corresponds to the model version it produces (no number means 1)

Trained models

  1. Tito Joker v1 (OpenAI GPT-2)
  2. Tito Joker v2 (OpenAI GPT-2)

Acknowledgments

Special thanks to Hugging Face for their implementation of OpenAI GPT-2 using PyTorch, Streamlit for making it super easy to deploy Tito Joker as a webapp.

About

Why is the AI named Tito Joker? Because in Filipino, "tito" means "uncle" when translated to English, and in the Philippines, we all have that uncle who says the corniest jokes!

To learn more, please refer to Tito Joker's medium article on Towards Data Science.