Skip to content

Commit

Permalink
QA doc: import torch before it is used (huggingface#24228)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and novice03 committed Jun 23, 2023
1 parent de0010b commit d034d59
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/en/tasks/question_answering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d034d59

Please sign in to comment.