Skip to content

Commit

Permalink
Update question_answering.md (#28694)
Browse files Browse the repository at this point in the history
fix typo:

from:

 "model = TFAutoModelForQuestionAnswering("distilbert-base-uncased")"

to:
model = TFAutoModelForQuestionAnswering.from_pretrained("distilbert-base-uncased")
  • Loading branch information
Yusuf authored Jan 25, 2024
1 parent 2000095 commit 24f1a00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/en/tasks/question_answering.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Then you can load DistilBERT with [`TFAutoModelForQuestionAnswering`]:
```py
>>> from transformers import TFAutoModelForQuestionAnswering

>>> model = TFAutoModelForQuestionAnswering("distilbert-base-uncased")
>>> model = TFAutoModelForQuestionAnswering.from_pretrained("distilbert-base-uncased")
```

Convert your datasets to the `tf.data.Dataset` format with [`~transformers.TFPreTrainedModel.prepare_tf_dataset`]:
Expand Down

0 comments on commit 24f1a00

Please sign in to comment.