Re-export KeyDataset. (#15645)
* Re-export `KeyDataset`. * Update the docs locations.
This commit is contained in:
@@ -118,7 +118,7 @@ Next, load a dataset (see the 🤗 Datasets [Quick Start](https://huggingface.co
|
||||
Now you can iterate over the dataset with the pipeline. `KeyDataset` retrieves the item in the dictionary returned by the dataset:
|
||||
|
||||
```py
|
||||
>>> from transformers.pipelines.base import KeyDataset
|
||||
>>> from transformers.pipelines.pt_utils import KeyDataset
|
||||
>>> from tqdm.auto import tqdm
|
||||
|
||||
>>> for out in tqdm(speech_recognizer(KeyDataset(dataset, "file"))):
|
||||
@@ -316,4 +316,4 @@ One particularly cool 🤗 Transformers feature is the ability to save a model a
|
||||
|
||||
>>> tokenizer = AutoTokenizer.from_pretrained(pt_save_directory)
|
||||
>>> tf_model = TFAutoModelForSequenceClassification.from_pretrained(pt_save_directory, from_pt=True)
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user