Skip to content
/ iNLG Public

Implementation of "Visualize Before You Write: Imagination-Guided Open-Ended Text Generation".

License

Notifications You must be signed in to change notification settings

VegB/iNLG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iNLG

This is the implementation code for Visualize Before You Write: Imagination-Guided Open-Ended Text Generation.

Environment Setup

Step 1: Download repo

git clone git@github.com:VegB/iNLG.git
cd iNLG/
for dataset in activitynet commongen rocstories
do
    mkdir -p log/${dataset}
done

Step 2: Setup conda environment

conda env create -f env.yml
conda activate inlg
python -m spacy download en

Step 3: Download datasets & checkpoints

python scripts/download_data_and_checkpoint.py

Text Generation

For Concept2Text

# text-only
bash scripts/run_concept2text_text_only.sh

# with images
bash scripts/run_concept2text_with_image.sh

For Sentence Completion

# text-only
bash scripts/run_sentence_completion_text_only.sh

# with images
bash scripts/run_sentence_completion_with_image.sh

For Story Generation

# text-only
bash scripts/run_story_generation_text_only.sh

# with images
bash scripts/run_story_generation_with_image.sh

About

Implementation of "Visualize Before You Write: Imagination-Guided Open-Ended Text Generation".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published