bastienp commited on
Commit
f3ede03
1 Parent(s): e27cb12

fix: change default config

Browse files
Files changed (1) hide show
  1. visible-watermark-pita.py +5 -7
visible-watermark-pita.py CHANGED
@@ -17,12 +17,12 @@ class WatermarkPitaConfig(datasets.BuilderConfig):
17
 
18
  def __init__(self, urls, categories, **kwargs):
19
  """BuilderConfig for Food-101.
20
-
21
  Args:
22
  repository: `string`, the name of the repository.
23
  urls: `dict<string, string>`, the urls to the data.
24
  categories: `list<string>`, the categories of the data.
25
-
26
  **kwargs: keyword arguments forwarded to super.
27
  """
28
  _VERSION = datasets.Version("1.0.0")
@@ -52,7 +52,7 @@ class WatermarkPita(datasets.GeneratorBasedBuilder):
52
  categories=["logo", "text"],
53
  ),
54
  ]
55
-
56
  DEFAULT_CONFIG_NAME = "text"
57
 
58
  def _info(self):
@@ -62,11 +62,9 @@ class WatermarkPita(datasets.GeneratorBasedBuilder):
62
  "image": datasets.Image(),
63
  "objects": datasets.Sequence(
64
  {
65
- "label": datasets.Sequence(
66
- datasets.ClassLabel(names=self.config.categories)
67
- ),
68
  "bbox": datasets.Sequence(
69
- datasets.Sequence(datasets.Value("int32"), length=4),
70
  ),
71
  }
72
  ),
 
17
 
18
  def __init__(self, urls, categories, **kwargs):
19
  """BuilderConfig for Food-101.
20
+
21
  Args:
22
  repository: `string`, the name of the repository.
23
  urls: `dict<string, string>`, the urls to the data.
24
  categories: `list<string>`, the categories of the data.
25
+
26
  **kwargs: keyword arguments forwarded to super.
27
  """
28
  _VERSION = datasets.Version("1.0.0")
 
52
  categories=["logo", "text"],
53
  ),
54
  ]
55
+
56
  DEFAULT_CONFIG_NAME = "text"
57
 
58
  def _info(self):
 
62
  "image": datasets.Image(),
63
  "objects": datasets.Sequence(
64
  {
65
+ "label": datasets.ClassLabel(names=self.config.categories),
 
 
66
  "bbox": datasets.Sequence(
67
+ datasets.Value("int32"), length=4
68
  ),
69
  }
70
  ),