This repo is the official codebase for my Medium article: Controlling Text Generation for Language Models.
To use this repo, first download the official PPLM repo from Uber AI:
git clone git clone https://github.com/uber-research/PPLM
Then, clone this repo and replace the existing run_pplm.py with the one in this repo (if you want to save the generated outputs).
Then follow the rest of the blog to see how you can generate text of a custom style.
generated_romance.txt
contains the generated book summaries using romance BoW.