In this project, I generated a Seinfeld TV script using RNNs. The Seinfled dataset of scripts from 9 seasons was used to train. The Neural Network I generated a new, "fake" TV script, based on patterns it reconginzes in this training data.
- Clone the repository and navigate to the downloaded folder.
git clone https://github.com/ayowolet/TV-Script-Generation.git cd TV-Script-Generation
- Open the
dlnd_tv_script_generation.ipynb
file. Of course, you can find HTML version of the file.jupyter notebook dlnd_tv_script_generation.ipynb
- Read and follow the instructions! This repository already includes the dataset in a form of txt flie in
data
folder.
- Get the Data
- Explore the Data
- Implement Pre-processing Functions
- Lookup Table
- Tokenize Punctuation
- Pre-process all the data and save it
- Check Access to GPU
- Input
- Batching
- Test your dataloader
- Sizes
- Values
- Build the Neural Network
- Define forward and backpropagation
- Neural Network Training
- Train Loop
- Hyperparameters
- Train
- Generate TV Script
- Generate text
- Generate a new script
The list below represents main libraries and its objects for the project.
- PyTorch (LSTM)