Added the necessay import of module (#30804)
This commit is contained in:
@@ -186,6 +186,7 @@ so we can just convert that directly to a NumPy array without tokenization!
|
||||
|
||||
```py
|
||||
from transformers import AutoTokenizer
|
||||
import numpy as np
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-cased")
|
||||
tokenized_data = tokenizer(dataset["sentence"], return_tensors="np", padding=True)
|
||||
|
||||
Reference in New Issue
Block a user