ThiennNguyen
commited on
Commit
•
3e89f16
1
Parent(s):
8aad643
Upload MangaColoring.py
Browse files- MangaColoring.py +22 -10
MangaColoring.py
CHANGED
@@ -18,16 +18,28 @@ _FEATURES = datasets.Features(
|
|
18 |
},
|
19 |
)
|
20 |
|
21 |
-
|
22 |
-
"
|
23 |
-
"
|
24 |
-
"
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
_DEFAULT_CONFIG = datasets.BuilderConfig(name="default", version=_VERSION)
|
28 |
|
29 |
|
30 |
-
class
|
31 |
BUILDER_CONFIGS = [_DEFAULT_CONFIG]
|
32 |
DEFAULT_CONFIG_NAME = "default"
|
33 |
|
@@ -42,10 +54,10 @@ class MangaColoring(datasets.GeneratorBasedBuilder):
|
|
42 |
)
|
43 |
|
44 |
def _split_generators(self, dl_manager):
|
45 |
-
metadata_path = dl_manager.download(
|
46 |
-
images_dir = dl_manager.download_and_extract(
|
47 |
conditioning_images_dir = dl_manager.download_and_extract(
|
48 |
-
|
49 |
)
|
50 |
|
51 |
return [
|
@@ -86,4 +98,4 @@ class MangaColoring(datasets.GeneratorBasedBuilder):
|
|
86 |
"path": conditioning_image_path,
|
87 |
"bytes": conditioning_image,
|
88 |
},
|
89 |
-
}
|
|
|
18 |
},
|
19 |
)
|
20 |
|
21 |
+
METADATA_URL = hf_hub_url(
|
22 |
+
"ThiennNguyen/MangaColoring",
|
23 |
+
filename="train.jsonl",
|
24 |
+
repo_type="dataset",
|
25 |
+
)
|
26 |
+
|
27 |
+
IMAGES_URL = hf_hub_url(
|
28 |
+
"ThiennNguyen/MangaColoring",
|
29 |
+
filename="images.zip",
|
30 |
+
repo_type="dataset",
|
31 |
+
)
|
32 |
+
|
33 |
+
CONDITIONING_IMAGES_URL = hf_hub_url(
|
34 |
+
"ThiennNguyen/MangaColoring",
|
35 |
+
filename="conditioning_images.zip",
|
36 |
+
repo_type="dataset",
|
37 |
+
)
|
38 |
|
39 |
_DEFAULT_CONFIG = datasets.BuilderConfig(name="default", version=_VERSION)
|
40 |
|
41 |
|
42 |
+
class Fill50k(datasets.GeneratorBasedBuilder):
|
43 |
BUILDER_CONFIGS = [_DEFAULT_CONFIG]
|
44 |
DEFAULT_CONFIG_NAME = "default"
|
45 |
|
|
|
54 |
)
|
55 |
|
56 |
def _split_generators(self, dl_manager):
|
57 |
+
metadata_path = dl_manager.download(METADATA_URL)
|
58 |
+
images_dir = dl_manager.download_and_extract(IMAGES_URL)
|
59 |
conditioning_images_dir = dl_manager.download_and_extract(
|
60 |
+
CONDITIONING_IMAGES_URL
|
61 |
)
|
62 |
|
63 |
return [
|
|
|
98 |
"path": conditioning_image_path,
|
99 |
"bytes": conditioning_image,
|
100 |
},
|
101 |
+
}
|