Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Elleo committed Apr 16, 2020
1 parent 653c83a commit 4dc3e8d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Petition Generator

A silly project to generate UK government style petitions via a GPT-2 transformer.

You can view the generated petitions here: https://elleo.github.io/petition_generator/

## Generating output

To generate your own output you can download a checkpoint from the releases section and unpack it in the project directory, or train yourself (see below)

Install the requirements by running `pip3 install -r requirements.txt`

Then simply run `./generate.py` to output a petition

The `generate_json.py` script can be used to add additional entries to the `pregenerated.json` file which is used by the HTML viewer.

## Training

To train the model ensure you've checked out the `uk_petitions_data` submodule by running `git submodule update --init`

Then just run `./train.py`

0 comments on commit 4dc3e8d

Please sign in to comment.