Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
cb5e50c8
Unverified
Commit
cb5e50c8
authored
Mar 11, 2022
by
Yih-Dar
Committed by
GitHub
Mar 11, 2022
Browse files
[Fix doc example] FSMT (#16085)
* fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
eaed6897
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/fsmt/modeling_fsmt.py
src/transformers/models/fsmt/modeling_fsmt.py
+1
-1
No files found.
src/transformers/models/fsmt/modeling_fsmt.py
View file @
cb5e50c8
...
...
@@ -207,7 +207,7 @@ FSMT_GENERATION_EXAMPLE = r"""
>>> tokenizer = FSMTTokenizer.from_pretrained(mname)
>>> src_text = "Машинное обучение - это здорово, не так ли?"
>>> input_ids = tokenizer(src_text, return_tensors="pt")
>>> input_ids = tokenizer(src_text, return_tensors="pt")
.input_ids
>>> outputs = model.generate(input_ids, num_beams=5, num_return_sequences=3)
>>> tokenizer.decode(outputs[0], skip_special_tokens=True)
"Machine learning is great, isn't it?"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment