GiordanoB commited on
Commit
1e8f924
1 Parent(s): 3bea5e2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -1
README.md CHANGED
@@ -24,7 +24,14 @@ It achieves the following results on the evaluation set:
24
 
25
  ## Model description
26
 
27
- for i in range(0,14):
 
 
 
 
 
 
 
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",