Skip to content

amurgo/Story_Generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rick and Morty Story Generator

Open in Streamlit

This project uses a pre-trained GPT2 model, which was fine-tuned on Rick and Morty transcripts, to generate new stories in the form of a dialog. The project uses Hugging Face's Transformers library to do inference and Streamlit for the application.

Try out the demo to generate fun stories or read the blog post on how to create your own story generator.

Fine-tuning a custom model

You can fine-tune your own model using Google Colab Open In Colab

Setup

This repository has only been tested with Python 3.7.

Install the dependencies in a virtual environment:

conda create -n myAppEnv python=3.7 transformers
conda activate myAppEnv
conda install -c huggingface transformers

pip install --upgrade pip setuptools
pip install -r requirements.txt

transformers @ git+git://github.com/huggingface/transformers@59b5953d89544a66d73

On the first run, the app will download the pre-trained model from Hugging Face's Model Hub or you can supply your own custom model in the load_model() function. To start the application, simply run:

streamlit run app.py

About

A Streamlit app that generates Rick and Morty stories using GPT2.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%