Created
October 5, 2022 02:07
-
-
Save jph00/75cc2213e9488435d44efad9fa13caab to your computer and use it in GitHub Desktop.
Example of using `prepare_for_task` in Hugging Face Datasets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datasets.tasks import ImageClassification | |
t = train.rename_columns({'image':'a', 'label':'b'}) | |
t2 = t.prepare_for_task(ImageClassification(image_column='a', label_column='b')) | |
t2.features |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment