Skip to content

What character from The Office would say that quote?

License

Notifications You must be signed in to change notification settings

ljkeller/DunderQueryin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DunderAI

What character from The Office would say that quote?

hotdog_ground_truth

DunderAI is a web application that uses deep learning with LSTM and Transformer models to predict which character from the popular TV show "The Office" is most likely to have said a given quote. With this application, users can test their knowledge of the show's characters and their mannerisms.

How it Works

DunderAI uses a deep learning model trained on quotes from the top 211 characters in The Office.

top21

The two available models for inference are the Long Short-Term Memory (LSTM) and a Tranformer models. LSTM networks are a form of recurrent neural networks (RNN) that are particularily good at processing sequences of data. Transformers, (DunderAI builds off of BERT) are very good at processing sequence data as well, but with a different mechanism, 'self-attention'. When a user inputs a quote, the model uses the input text to predict which character is most likely to have said the line; model predictions are all based upon what language and speech patterns the network could pick up on.

Features

  • Easy to use web interface
  • Input new or adjusted quote to receive character prediction
  • Ability to handle direct quotes accurately from any episode of "The Office" even deleted scenes

Usage (localhost)

  1. conda env create -f environment.yml
    1. conda activate DunderAI
  2. cd DunderAI && python manage.py
  3. Visit http://127.0.0.1:8000/ in your web browser.
  4. Input a quote from "The Office" into the text field.
  5. Click the "Submit" button to receive a prediction of which character said the quote. (Assuming you have a fastai model in data/models)
DunderAIFull.mp4

Credits

DunderAI was created by myself using Python, Fastai, Django, and HTML/CSS. The dataset used to train the LSTM and BERT models was obtained from [Kaggle]. This all started as a healthy competition with a friend to see who could train the better model- an excuse to learn more about NLP.

License

DunderAI is licensed under the MIT License. Please see the LICENSE file for more information.

Disclaimer

DunderAI is a fan project and is not affiliated with the TV show "The Office" or its creators in any way.

Footnotes

  1. Top 21 characters being the 21 characters with the most voice lines.

About

What character from The Office would say that quote?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages