Update README.md
Browse files
README.md
CHANGED
@@ -24,7 +24,14 @@ It achieves the following results on the evaluation set:
|
|
24 |
|
25 |
## Model description
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
input_ids = tokenizer(
|
29 |
[WHITESPACE_HANDLER(sumariosDuplos[i])],
|
30 |
return_tensors="pt",
|
|
|
24 |
|
25 |
## Model description
|
26 |
|
27 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
28 |
+
|
29 |
+
WHITESPACE_HANDLER = lambda k: re.sub('\s+', ' ', re.sub('\n+', ' ', k.strip()))
|
30 |
+
|
31 |
+
model_name = "GiordanoB/mT5_multilingual_XLSum-sumarizacao-PTBR"
|
32 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
33 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
34 |
+
|
35 |
input_ids = tokenizer(
|
36 |
[WHITESPACE_HANDLER(sumariosDuplos[i])],
|
37 |
return_tensors="pt",
|