albertvillanova HF staff commited on
Commit
ed7a650
1 Parent(s): d5ec510

Remove deprecated tasks

Browse files

This dataset uses `tasks`, which are deprecated and will raise an error after the next major release of `datasets`. See: https://github.com/huggingface/datasets/pull/6999

Files changed (1) hide show
  1. food101.py +0 -2
food101.py CHANGED
@@ -18,7 +18,6 @@ import json
18
  from pathlib import Path
19
 
20
  import datasets
21
- from datasets.tasks import ImageClassification
22
 
23
 
24
  _BASE_URL = "http://data.vision.ee.ethz.ch/cvl/food-101.tar.gz"
@@ -162,7 +161,6 @@ class Food101(datasets.GeneratorBasedBuilder):
162
  ),
163
  supervised_keys=("image", "label"),
164
  homepage=_HOMEPAGE,
165
- task_templates=[ImageClassification(image_file_path_column="image", label_column="label", labels=_NAMES)],
166
  citation=_CITATION,
167
  )
168
 
 
18
  from pathlib import Path
19
 
20
  import datasets
 
21
 
22
 
23
  _BASE_URL = "http://data.vision.ee.ethz.ch/cvl/food-101.tar.gz"
 
161
  ),
162
  supervised_keys=("image", "label"),
163
  homepage=_HOMEPAGE,
 
164
  citation=_CITATION,
165
  )
166