Skip to content

Official Code for NAACL 2022 paper: "Persona-Guided Planning for Controlling the Protagonist's Persona in Story Generation"

License

Notifications You must be signed in to change notification settings

thu-coai/ConPer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConPer

Code and datasets for our paper Persona-Guided Planning for Persona-Aware Story Generation

1. Environment Setup

python 3.7

pip 20.3.3

Install dependencies

pip install -r requirements.txt

2.Run

Preparation

Download datasets

The preprocessed datasets can be obtained from this link.

You need to put the preprocessed data in data/.

Download fine-tuned model

The fine-tuned model can be obatined from this link

You need to put the fine-tuned checkpoint in results/.

Train

To train a model, you can run the following command, where 0 denotes GPU_ID.

bash scripts/train.sh 0

Generate

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

About

Official Code for NAACL 2022 paper: "Persona-Guided Planning for Controlling the Protagonist's Persona in Story Generation"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published