mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
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:
parent
6ab045d6fe
commit
91b62f5a78
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user