Update README.md
Browse files
README.md
CHANGED
@@ -14,19 +14,18 @@ rebel-base-chinese-cndbpedia is a generation-based relation extraction model
|
|
14 |
|
15 |
#using model:
|
16 |
|
17 |
-
|
18 |
from transformers import BertTokenizer, BartForConditionalGeneration
|
19 |
|
20 |
model_name = 'fnlp/bart-base-chinese'
|
21 |
-
|
22 |
tokenizer_kwargs = {
|
23 |
"use_fast": True,
|
24 |
"additional_special_tokens": ['<rel>', '<obj>', '<subj>'],
|
25 |
}
|
26 |
-
|
27 |
tokenizer = BertTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
|
28 |
|
29 |
|
30 |
model = BartForConditionalGeneration.from_pretrained("fanxiao/rebel-base-chinese-cndbpedia")
|
31 |
|
32 |
-
'''
|
|
|
14 |
|
15 |
#using model:
|
16 |
|
17 |
+
|
18 |
from transformers import BertTokenizer, BartForConditionalGeneration
|
19 |
|
20 |
model_name = 'fnlp/bart-base-chinese'
|
21 |
+
'''
|
22 |
tokenizer_kwargs = {
|
23 |
"use_fast": True,
|
24 |
"additional_special_tokens": ['<rel>', '<obj>', '<subj>'],
|
25 |
}
|
26 |
+
'''
|
27 |
tokenizer = BertTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
|
28 |
|
29 |
|
30 |
model = BartForConditionalGeneration.from_pretrained("fanxiao/rebel-base-chinese-cndbpedia")
|
31 |
|
|