Skip to content

An LSTM implementation in PyTorch that generates a new, "fake" TV script using Seinfeld dataset of scripts from 9 seasons.

Notifications You must be signed in to change notification settings

anubhavshrimal/RNN-Generate-TV-Scripts

Repository files navigation

Project Overview

This project is done as a part of the Udacity's Deep Learning Nanodegree. The Long Short Term Memory Networks, a type of RNN, is trained over Seinfeld TV scripts from 9 seasons. The trained model is then able to generate new "fake" tv scripts similar to Seinfeld.

LSTMs are implemented using PyTorch framework.

Fake generated tv script by the project can be found in generated_script_1.txt

Instructions

  1. Clone the repository and navigate to the downloaded folder.

    	git clone https://github.com/anubhavshrimal/RNN-Generate-TV-Scripts.git
    	cd RNN-Generate-TV-Scripts/
    
  2. Install required dependencies using:

    	pip install -r requirements.txt
    
  3. Open a terminal window and navigate to the project folder. Open the notebook using the bellow command and follow the instructions given in the notebook.

    	jupyter notebook dlnd_tv_script_generation.ipynb
    

Accelerating the Training Process

If your code is taking too long to run, you will need to switch to running your code on a GPU. If you'd like to use a GPU, you can use Google Colab.

Note: Colab is a free service and the data is not persistent. It is suggested to download whatever data you need once your session is idle otherwise you may lose the progress.

You can use Amazon Web Services to launch an EC2 GPU instance which will be persistent. (This costs money)

Output:

Fake script generated by the trained model.

  • Even thought the script may not make sense exactly, the model is able to generate meaning full structures.
  • More training and complex model by increasing the LSTM model layers can improve the quality even further.
elaine: wolfram?!(jerry shakes the door.)

elaine: oh yeah, i just want you to have dinner with me.

elaine: i don't know.

kramer: oh, i don't want to talk to him.(to elaine)

george: what are we gonna do?

george: i got the whole thing, but i'm gonna be here.

helen: you want to know, you should have a good time.

jerry: oh, i don't want any money.

george:(to george) you know, i know.(george leaves.)

kramer:(to elaine) what is that?

george: well, you know, i think i could be a little bit, but i know.

george: i don't want to see you, because i was just thinking of this, you can have to do it.

jerry: oh, i don't think so.

george:(to kramer) hey, i guess i'll get it.

jerry: well, it's a very popular guy.

kramer: yeah.

jerry: oh my god.(he leaves)

george:(to the guy) hey, what do i have to do?

kramer: yeah.

elaine: yeah, but i think i got a job.

elaine: i just got a little too bad in a limousine.

jerry: oh, yeah, i think i could.

george:(to jerry on a second) yeah, i guess you got a good 'john houseman' idea of the first time ago. i was a kid, i don't know how to get a job, because i can get a chance to get back to my parents.

jerry: what about your name?

kramer: well, it's a good idea.

george:(to elaine) hey, i just spoke to her. i don't think i'm here to do it.

george:(to elaine on the floor) oh, my god!

About

An LSTM implementation in PyTorch that generates a new, "fake" TV script using Seinfeld dataset of scripts from 9 seasons.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published