Before installing libraries, ensure that conda installed
- Create environment with conda
conda create -n keyword2title python=3.8
-
k2t (stand for keyword to title) is name of environment
-
python=3.8 to define python version is using
-
Activate environment:
conda activate k2t
- cd to app:
cd /path/to/app
- Install libraries
pip install -r requirements.txt
We provide 2 models that is T5 and BART to generate title from keywords. Before running application you have to download them at here:
Then, you need to unzip and place 2 models in models folder. For example:
- models
sh run_1.sh
After running success, You call API from below URL: http://localhost:8098/generate_title_from_kw_v1?spans=keywords
- keywords are list of words separated by comma
- For example: You can generate title from 'woman, man, love'
http://localhost:8098/generate_title_from_kw_v1?spans=woman, man, love
sh run_2.sh
After running success, You call API from below URL:
http://localhost:8098/generate_title_from_kw_v2?spans=keywords
- keywords are list of words separated by comma
- For example: You can generate title from 'woman, man, love'
http://localhost:8098/generate_title_from_kw_v1?spans=woman, man, love