From 91b62f5a785264b626ec7ba708c894ac0276f5cb Mon Sep 17 00:00:00 2001 From: ByronHsu Date: Wed, 14 Jun 2023 03:23:55 -0700 Subject: [PATCH] QA doc: import torch before it is used (#24228) * import torch before it is used * style Signed-off-by: byhsu --------- Signed-off-by: byhsu Co-authored-by: byhsu --- docs/source/en/tasks/question_answering.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/en/tasks/question_answering.mdx b/docs/source/en/tasks/question_answering.mdx index fa39b64049..ae31a070fc 100644 --- a/docs/source/en/tasks/question_answering.mdx +++ b/docs/source/en/tasks/question_answering.mdx @@ -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")