Unverified Commit 91b62f5a authored by ByronHsu's avatar ByronHsu Committed by GitHub
Browse files

QA doc: import torch before it is used (#24228)



* import torch before it is used

* style
Signed-off-by: default avatarbyhsu <byhsu@linkedin.com>

---------
Signed-off-by: default avatarbyhsu <byhsu@linkedin.com>
Co-authored-by: default avatarbyhsu <byhsu@linkedin.com>
parent 6ab045d6
......@@ -369,6 +369,7 @@ Tokenize the text and return PyTorch tensors:
Pass your inputs to the model and return the `logits`:
```py
>>> import torch
>>> from transformers import AutoModelForQuestionAnswering
>>> model = AutoModelForQuestionAnswering.from_pretrained("my_awesome_qa_model")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment