Skip to content

hungnmai/keyword2title

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GENERATE TITLE FROM KEYWORDS


1. Install libraries

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

2. Run application

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:

2.1 To run BART model:
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
2.2. To run T5 model
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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published