** PreSumm modules was originally from https://github.com/nlpyang/PreSumm **
- generate summary on given text
please follow this documents about how to train and use the model generated by BertSum
- clone this project to your local disk
git clone https://github.com/Quan25/flask-summary.git
- cd into the cloned project and download PreSumm
git clone https://github.com/nlpyang/PreSumm.git
- cd into PreSumm folder and change the branch to dev
git checkout dev
- Install Flask
- Install ROUGE-1.5.5
- Install
libxml-parser-perl
, it is essential for installing ROUGE-1.5.5
sudo apt-get install libxml-parser-perl
- and make sure you can run this, which means the ROUGE is successfully installed
./runROUGE-test.pl
- Install pyrouge
git clone https://github.com/bheinzerling/pyrouge.git
cd pyrouge
pip install -e .
- Additional information can be found here about how to install pyrouge and running the test
- Please install pytorch 1.1.0 with this comand
- GPU
conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch
- CPU Only
conda install pytorch-cpu==1.1.0 torchvision-cpu==0.3.0 cpuonly -c pytorch
- put your model file(i.e. xxxxx.pt) inside
/PreSumm/models
- add the following
PYTHONPATH
to bash_profile
export PYTHONPATH=$PYTHONPATH:/path/to/flask-summary/PreSumm/src
export PYTHONPATH=$PYTHONPATH:/path/to/flask-summary/PreSumm/
- run
source ~/.bash_profile
- Run
python app.py
in the flask-summary directory. - Start web server by running
python app.py
while in the server_example directory. - Browse the examples at 0.0.0.0:5000 using a browser. (defaults to port
5000
)