Update README.md
Browse files
README.md
CHANGED
@@ -13,6 +13,7 @@ rebel-base-chinese-cndbpedia is a generation-based relation extraction model
|
|
13 |
·input is sentence,and output is linearlize triples,such as input:姚明是一名NBA篮球运动员 output:[subj]姚明[obj]NBA[rel]公司[obj]篮球运动员[rel]职业(more details can read on REBEL paper)
|
14 |
|
15 |
#using model:
|
|
|
16 |
'''
|
17 |
from transformers import BertTokenizer, BartForConditionalGeneration
|
18 |
|
@@ -25,6 +26,7 @@ tokenizer_kwargs = {
|
|
25 |
|
26 |
tokenizer = BertTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
|
27 |
|
28 |
-
|
29 |
model = BartForConditionalGeneration.from_pretrained("fanxiao/rebel-base-chinese-cndbpedia")
|
|
|
30 |
'''
|
|
|
13 |
·input is sentence,and output is linearlize triples,such as input:姚明是一名NBA篮球运动员 output:[subj]姚明[obj]NBA[rel]公司[obj]篮球运动员[rel]职业(more details can read on REBEL paper)
|
14 |
|
15 |
#using model:
|
16 |
+
|
17 |
'''
|
18 |
from transformers import BertTokenizer, BartForConditionalGeneration
|
19 |
|
|
|
26 |
|
27 |
tokenizer = BertTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
|
28 |
|
29 |
+
|
30 |
model = BartForConditionalGeneration.from_pretrained("fanxiao/rebel-base-chinese-cndbpedia")
|
31 |
+
|
32 |
'''
|