add image-classification task template
MEMBER
Awesome!
2021-07-13T15:29:31Z
https://github.com/huggingface/datasets/pull/2632#issuecomment-879188177
https://api.github.com/repos/huggingface/datasets/issues/2632
MDEyOklzc3VlQ29tbWVudDg3OTE4ODE3Nw==
https://api.github.com/repos/huggingface/datasets/issues/comments/879188177/reactions
2021-07-13T15:29:31Z
https://api.github.com/repos/huggingface/datasets/issues/comments/879188177
https://avatars.githubusercontent.com/u/7353373?v=4
https://api.github.com/users/thomwolf/events{/privacy}
https://api.github.com/users/thomwolf/followers
https://api.github.com/users/thomwolf/following{/other_user}
https://api.github.com/users/thomwolf/gists{/gist_id}
https://github.com/thomwolf
thomwolf
MDQ6VXNlcjczNTMzNzM=
https://api.github.com/users/thomwolf/orgs
https://api.github.com/users/thomwolf/received_events
https://api.github.com/users/thomwolf/repos
https://api.github.com/users/thomwolf/starred{/owner}{/repo}
https://api.github.com/users/thomwolf/subscriptions
User
https://api.github.com/users/thomwolf
public
MEMBER
Thanks for adding a new task template - great work @nateraw  🚀 !
2021-07-13T15:44:28Z
https://github.com/huggingface/datasets/pull/2632#issuecomment-879199128
https://api.github.com/repos/huggingface/datasets/issues/2632
MDEyOklzc3VlQ29tbWVudDg3OTE5OTEyOA==
https://api.github.com/repos/huggingface/datasets/issues/comments/879199128/reactions
2021-07-13T15:44:28Z
https://api.github.com/repos/huggingface/datasets/issues/comments/879199128
https://avatars.githubusercontent.com/u/26859204?v=4
https://api.github.com/users/lewtun/events{/privacy}
https://api.github.com/users/lewtun/followers
https://api.github.com/users/lewtun/following{/other_user}
https://api.github.com/users/lewtun/gists{/gist_id}
https://github.com/lewtun
lewtun
MDQ6VXNlcjI2ODU5MjA0
https://api.github.com/users/lewtun/orgs
https://api.github.com/users/lewtun/received_events
https://api.github.com/users/lewtun/repos
https://api.github.com/users/lewtun/starred{/owner}{/repo}
https://api.github.com/users/lewtun/subscriptions
User
https://api.github.com/users/lewtun
public
Snippet below is the tl;dr, but you can try it out directly here:

[![Open In Collab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/gist/nateraw/005c025d41f0e48ae3d4ee61c0f20b70/image-classification-task-template-demo.ipynb)

```python
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
#     })
# })
```