Unverified Commit 799cea64 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix rendering issue in quicktour (#20708)

* Fix rendering issue in quicktour

* Separate in two blocks
parent 74330083
......@@ -440,13 +440,16 @@ Depending on your task, you'll typically pass the following parameters to [`Trai
>>> dataset = load_dataset("rotten_tomatoes") # doctest: +IGNORE_RESULT
```
5. Create a function to tokenize the dataset, and apply it over the entire dataset with [`~datasets.Dataset.map`]:
5. Create a function to tokenize the dataset:
```py
>>> def tokenize_dataset(dataset):
... return tokenizer(dataset["text"])
```
Then apply it over the entire dataset with [`~datasets.Dataset.map`]:
```py
>>> dataset = dataset.map(tokenize_dataset, batched=True)
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment