alkzar90 commited on
Commit
c6a8eb4
·
1 Parent(s): bd366ff

Fix indentation error

Browse files
Files changed (1) hide show
  1. rock-glacier-dataset.py +13 -13
rock-glacier-dataset.py CHANGED
@@ -65,18 +65,18 @@ class RockGlacierDataset(datasets.GeneratorBasedBuilder):
65
  ]
66
 
67
  def _info(self):
68
- if self.config.name == "image-classification":
69
- features = dataset.Features({
70
  "image": datasets.Image(),
71
  "labels": datasets.features.ClassLabel(names=_NAMES),
72
- })
73
- keys = ("image", "labels")
74
- task = [ImageClassification(image_column="image", label_column="labels")]
75
 
76
- if self.config.name == "image-segmentation":
77
- pass
78
 
79
- return datasets.DatasetInfo(
80
  description=_DESCRIPTION,
81
  features=features,
82
  supervised_keys=("image", "labels"),
@@ -105,11 +105,11 @@ class RockGlacierDataset(datasets.GeneratorBasedBuilder):
105
 
106
  def _generate_examples(self, files):
107
 
108
- if selg.config.name == "image-classification":
109
- for i, path in enumerate(files):
110
- file_name = os.path.basename(path)
111
  if file_name.endswith(".png"):
112
- yield i, {
113
  "image": path,
114
  "labels": os.path.basename(os.path.dirname(path)).lower(),
115
- }
 
65
  ]
66
 
67
  def _info(self):
68
+ if self.config.name == "image-classification":
69
+ features = dataset.Features({
70
  "image": datasets.Image(),
71
  "labels": datasets.features.ClassLabel(names=_NAMES),
72
+ })
73
+ keys = ("image", "labels")
74
+ task = [ImageClassification(image_column="image", label_column="labels")]
75
 
76
+ if self.config.name == "image-segmentation":
77
+ pass
78
 
79
+ return datasets.DatasetInfo(
80
  description=_DESCRIPTION,
81
  features=features,
82
  supervised_keys=("image", "labels"),
 
105
 
106
  def _generate_examples(self, files):
107
 
108
+ if selg.config.name == "image-classification":
109
+ for i, path in enumerate(files):
110
+ file_name = os.path.basename(path)
111
  if file_name.endswith(".png"):
112
+ yield i, {
113
  "image": path,
114
  "labels": os.path.basename(os.path.dirname(path)).lower(),
115
+ }