-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |