Commit
·
1077aaf
1
Parent(s):
a70982f
Update LoadingScript
Browse files- LoadingScriptPractice.py +17 -16
LoadingScriptPractice.py
CHANGED
|
@@ -32,31 +32,31 @@ Using for Project Learning...
|
|
| 32 |
# https://huggingface.co/docs/datasets/about_dataset_load
|
| 33 |
|
| 34 |
|
| 35 |
-
class LoadingScriptPracticeConfig(datasets.BuilderConfig):
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
|
| 49 |
class LoadingScriptPractice(datasets.GeneratorBasedBuilder):
|
| 50 |
|
| 51 |
# データのサブセットはここで用意
|
| 52 |
BUILDER_CONFIGS = [
|
| 53 |
-
|
| 54 |
name="MusicCaps data 0_3",
|
| 55 |
description="this Datasets is personal practice for using loadingScript. Data is from Google/MusicCaps",
|
| 56 |
)
|
| 57 |
]
|
| 58 |
|
| 59 |
-
def _info(self):
|
| 60 |
return datasets.DatasetInfo(
|
| 61 |
description=_DESCRIPTION,
|
| 62 |
features=datasets.Features(
|
|
@@ -70,7 +70,8 @@ class LoadingScriptPractice(datasets.GeneratorBasedBuilder):
|
|
| 70 |
),
|
| 71 |
supervised_keys=("image", "caption", "data_idx", "number", "label"),
|
| 72 |
# homepage=_HOMEPAGE,
|
| 73 |
-
|
|
|
|
| 74 |
# license=_LICENSE,
|
| 75 |
# task_templates=[ImageClassification(image_column="image", label_column="label")],
|
| 76 |
)
|
|
|
|
| 32 |
# https://huggingface.co/docs/datasets/about_dataset_load
|
| 33 |
|
| 34 |
|
| 35 |
+
# class LoadingScriptPracticeConfig(datasets.BuilderConfig):
|
| 36 |
+
# """Builder Config for spectrogram_MusicCaps"""
|
| 37 |
+
|
| 38 |
+
# def __init__(self, **kwargs):
|
| 39 |
+
# """BuilderConfig
|
| 40 |
+
# Args:
|
| 41 |
+
# data_url: `string`, url to download the zip file from.
|
| 42 |
+
# metadata_urls: dictionary with keys 'train' and 'validation' containing the archive metadata URLs
|
| 43 |
+
# **kwargs: keyword arguments forwarded to super.
|
| 44 |
+
# """
|
| 45 |
+
# super(LoadingScriptPracticeConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
|
| 46 |
+
# # self.data_url = data_url
|
| 47 |
+
# # self.metadata_urls = metadata_urls
|
| 48 |
|
| 49 |
class LoadingScriptPractice(datasets.GeneratorBasedBuilder):
|
| 50 |
|
| 51 |
# データのサブセットはここで用意
|
| 52 |
BUILDER_CONFIGS = [
|
| 53 |
+
datasets.BuilderConfig(
|
| 54 |
name="MusicCaps data 0_3",
|
| 55 |
description="this Datasets is personal practice for using loadingScript. Data is from Google/MusicCaps",
|
| 56 |
)
|
| 57 |
]
|
| 58 |
|
| 59 |
+
def _info(self) -> DatasetInfo:
|
| 60 |
return datasets.DatasetInfo(
|
| 61 |
description=_DESCRIPTION,
|
| 62 |
features=datasets.Features(
|
|
|
|
| 70 |
),
|
| 71 |
supervised_keys=("image", "caption", "data_idx", "number", "label"),
|
| 72 |
# homepage=_HOMEPAGE,
|
| 73 |
+
citation= "",
|
| 74 |
+
description=self.config.description
|
| 75 |
# license=_LICENSE,
|
| 76 |
# task_templates=[ImageClassification(image_column="image", label_column="label")],
|
| 77 |
)
|