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

* import torch before it is used

* style

Signed-off-by: byhsu <byhsu@linkedin.com>

---------

Signed-off-by: byhsu <byhsu@linkedin.com>
Co-authored-by: byhsu <byhsu@linkedin.com>
This commit is contained in:
ByronHsu 2023-06-14 03:23:55 -07:00 committed by GitHub
parent 6ab045d6fe
commit 91b62f5a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")