Re-export KeyDataset. (#15645)
* Re-export `KeyDataset`. * Update the docs locations.
This commit is contained in:
@@ -78,7 +78,7 @@ GPU. If it doesn't don't hesitate to create an issue.
|
||||
```python
|
||||
import datasets
|
||||
from transformers import pipeline
|
||||
from transformers.pipelines.base import KeyDataset
|
||||
from transformers.pipelines.pt_utils import KeyDataset
|
||||
from tqdm.auto import tqdm
|
||||
|
||||
pipe = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-960h", device=0)
|
||||
@@ -128,7 +128,7 @@ whenever the pipeline uses its streaming ability (so when passing lists or `Data
|
||||
|
||||
```python
|
||||
from transformers import pipeline
|
||||
from transformers.pipelines.base import KeyDataset
|
||||
from transformers.pipelines.pt_utils import KeyDataset
|
||||
import datasets
|
||||
|
||||
dataset = datasets.load_dataset("imdb", name="plain_text", split="unsupervised")
|
||||
|
||||
Reference in New Issue
Block a user