Skip to content

Conversation

@nateraw
Copy link
Contributor

@nateraw nateraw commented Jul 12, 2021

Snippet below is the tl;dr, but you can try it out directly here:

Open In Collab

from datasets import load_dataset

ds = load_dataset('nateraw/image-folder', data_files='PetImages/')
# DatasetDict({
#     train: Dataset({
#         features: ['file', 'labels'],
#         num_rows: 23410
#     })
# })

ds = ds.prepare_for_task('image-classification')
# DatasetDict({
#     train: Dataset({
#         features: ['image_file_path', 'labels'],
#         num_rows: 23410
#     })
# })

@nateraw nateraw requested review from SBrandeis and lhoestq July 12, 2021 17:42
Copy link
Member

@albertvillanova albertvillanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you for this new task template.

It seems good to me.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! cc @lewtun

@lhoestq lhoestq merged commit dcc2cf1 into huggingface:master Jul 13, 2021
@thomwolf
Copy link
Member

Awesome!

@lewtun
Copy link
Member

lewtun commented Jul 13, 2021

Thanks for adding a new task template - great work @nateraw 🚀 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants