Narrativa commited on
Commit
541b029
1 Parent(s): db5131d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -2
README.md CHANGED
@@ -72,7 +72,7 @@ pip install -q ./transformers
72
  ```python
73
  from transformers import MBart50TokenizerFast, MBartForConditionalGeneration
74
 
75
- ckpt = 'mbart-large-50-finetuned-opus-en-pt-translation'
76
 
77
  tokenizer = MBart50TokenizerFast.from_pretrained(ckpt)
78
  model = MBartForConditionalGeneration.from_pretrained(ckpt).to("cuda")
@@ -80,7 +80,6 @@ model = MBartForConditionalGeneration.from_pretrained(ckpt).to("cuda")
80
  tokenizer.src_lang = 'en_XX'
81
 
82
  def translate(text):
83
-
84
  inputs = tokenizer(text, return_tensors='pt')
85
  input_ids = inputs.input_ids.to('cuda')
86
  attention_mask = inputs.attention_mask.to('cuda')
 
72
  ```python
73
  from transformers import MBart50TokenizerFast, MBartForConditionalGeneration
74
 
75
+ ckpt = 'Narrativa/mbart-large-50-finetuned-opus-en-pt-translation'
76
 
77
  tokenizer = MBart50TokenizerFast.from_pretrained(ckpt)
78
  model = MBartForConditionalGeneration.from_pretrained(ckpt).to("cuda")
 
80
  tokenizer.src_lang = 'en_XX'
81
 
82
  def translate(text):
 
83
  inputs = tokenizer(text, return_tensors='pt')
84
  input_ids = inputs.input_ids.to('cuda')
85
  attention_mask = inputs.attention_mask.to('cuda')