Matthijs commited on
Commit
2221b97
1 Parent(s): 22b699f

remove path column

Browse files
Files changed (1) hide show
  1. snacks.py +3 -3
snacks.py CHANGED
@@ -47,7 +47,7 @@ class Snacks(datasets.GeneratorBasedBuilder):
47
  description=_DESCRIPTION,
48
  features=datasets.Features(
49
  {
50
- "image_file_path": datasets.Value("string"),
51
  "image": datasets.Image(),
52
  "label": datasets.features.ClassLabel(names=_NAMES),
53
  }
@@ -56,7 +56,7 @@ class Snacks(datasets.GeneratorBasedBuilder):
56
  homepage=_HOMEPAGE,
57
  citation=_CITATION,
58
  license=_LICENSE,
59
- task_templates=ImageClassification(image_column="img", label_column="label"),
60
  )
61
 
62
  def _split_generators(self, dl_manager):
@@ -81,7 +81,7 @@ class Snacks(datasets.GeneratorBasedBuilder):
81
  for i, file in enumerate(files):
82
  if os.path.basename(file).endswith(".jpg"):
83
  yield str(i), {
84
- "image_file_path": file,
85
  "image": file,
86
  "label": os.path.basename(os.path.dirname(file)).lower(),
87
  }
47
  description=_DESCRIPTION,
48
  features=datasets.Features(
49
  {
50
+ #"image_file_path": datasets.Value("string"),
51
  "image": datasets.Image(),
52
  "label": datasets.features.ClassLabel(names=_NAMES),
53
  }
56
  homepage=_HOMEPAGE,
57
  citation=_CITATION,
58
  license=_LICENSE,
59
+ task_templates=ImageClassification(image_column="image", label_column="label"),
60
  )
61
 
62
  def _split_generators(self, dl_manager):
81
  for i, file in enumerate(files):
82
  if os.path.basename(file).endswith(".jpg"):
83
  yield str(i), {
84
+ #"image_file_path": file,
85
  "image": file,
86
  "label": os.path.basename(os.path.dirname(file)).lower(),
87
  }