Added the necessay import of module (#30804)

This commit is contained in:
Ankur Singh 2024-05-14 23:15:06 +05:30 committed by GitHub
parent ccdabc5642
commit c96aca3a8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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)