Create the environment with conda and pip.
conda env create -f environment.yml
conda activate season
pip install -r requirements.txtInstall nltk "punkt" package.
python -c "import nltk; nltk.download('punkt');"We've tested this environment with python 3.8 and cuda 10.2. (For other CUDA version, please install the corresponding packages)
Run the following commands to download the CNN/DM dataset, preprocess it, and save it locally.
mkdir data- For ELIFE dataset
python preprocess.py --dataset elife- For PLOS dataset
python preprocess.py --dataset elifePlease run the scripts below:
bash run_train.shThe trained model parameters and training logs are saved in outputs/train folder.
You can use our trained model weights to generate summaries for your data.
mkdir checkpoints
cd checkpointsStep 2. Generate summaries for CNN/DM Test set.
bash run_inference.shAfter running the script, you will get the results in outputs/inference folder including the predicted summaries in generated_predictions.txt and the ROUGE results in predict_results.json.
- We thank the authors of Season their open-source codes.
