Google ML Camp-燃烧我的GPU-项目
- Tag Classification
- (Pipeline) Training code
- (Pipeline) Test code
- (Pipeline) Inference API
- (Model) PoolLSTM
- (Model) RCNN+
- (Model) Bert
- Keywords Extraction
- (Pipeline) Test code
- (Pipeline) Inference API
- Abstractive Summarization
- (Pipeline) Training code
- (Pipeline) Test code
- (Pipeline) Inference API
- (Model) Seq2seq+Attn
- (Model) Effective Pointer generator
- Text Style Transfering
- (Pipeline) Training code
- (Pipeline) Test code
- Demo
- Basic Layout
- Attention Visualization
$ git@github.com:OwenMasculinity/ML-Camp-BurnMyGpu.git
$ python setup.py install
from titletrigger.api import extract_keywords
content = "国务院总理李克强21日下午在中南海紫光阁会见中印边界问题印方特别代表"
extract_keywords(content, K=3)
from titletrigger.api import ext_summarize
content = "国务院总理李克强21日下午在中南海紫光阁会见中印边界问题印方特别代表xxxx"
ext_headline = " ".join(ext_summarize([content])[0])
import sys
from titletrigger.api import tag_classify
sys.path.append('titletrigger/textclf')
clf_model_path = "YOU_MODEL_PATH"
clf_model_file = load_model(clf_model_path)
content = "国务院总理李克强21日下午在中南海紫光阁会见中印边界问题印方特别代表xxxx"
tag = tag_classify([content], clf_model_file)
pre-trained models can be downloaded in this link
import sys
from titletrigger.api import abs_summarize
sys.path.append('titletrigger/textsum')
clf_model_path = "YOU_MODEL_PATH"
content = "国务院总理李克强21日下午在中南海紫光阁会见中印边界问题印方特别代表xxxx"
result_dict = abs_summarize([content_list], sum_model_file)
tag = tag_classify(content_list, clf_model_file)
pre-trained models can be downloaded in this link
from titletrigger.api import style_transfer
content = "国务院总理李克强21日下午在中南海紫光阁会见中印边界问题印方特别代表xxxx"
transferred_text = style_transfer(content)
Downloading data from this link
split it into train.csv
, valid.csv
, test.csv
move them into titletrigger/textclf/data/chinese_news
$ cd titletrigger/textclf
$ ls data/chinese_news
train.csv
valid.csv
test.csv
$ python train.py -config conifg/config_rcnn.json
move data splits into titletrigger/textclf/data/chinese_news
$ cd titletrigger/textclf
$ ls data/chinese_news
train.csv
valid.csv
test.csv
$ python train.py -config conifg/config_copynet.json
First open a httpserver
$ cd website
$ python -m http.server 8000
Open http://localhost:8000/demo.html in your browser