Code and datasets for our paper Persona-Guided Planning for Persona-Aware Story Generation
python 3.7
pip 20.3.3
Install dependencies
pip install -r requirements.txt
The preprocessed datasets can be obtained from this link.
You need to put the preprocessed data in data/
.
The fine-tuned model can be obatined from this link
You need to put the fine-tuned checkpoint in results/
.
To train a model, you can run the following command, where 0
denotes GPU_ID.
bash scripts/train.sh 0
To generate stories, you can run the following command, where 0
denotes GPU_ID.
bash scripts/generate.sh 0
main arguments:
--ckpt_path: path of the fine-tuned checkpoint
--output_path: path of the generation result