Commit
·
3395d86
1
Parent(s):
d78ecbb
Update vasr.py
Browse files
vasr.py
CHANGED
@@ -38,19 +38,16 @@ _URLS = {
|
|
38 |
"test": os.path.join(_URL, "test_gold.csv"),
|
39 |
}
|
40 |
|
41 |
-
class
|
42 |
VERSION = datasets.Version("1.1.0")
|
43 |
|
44 |
# If you need to make complex sub-parts in the datasets with configurable options
|
45 |
# You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
|
46 |
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
47 |
|
48 |
-
# You will be able to load one or the other configurations in the following list with
|
49 |
-
# data = datasets.load_dataset('vasr', 'test')
|
50 |
BUILDER_CONFIGS = [
|
51 |
datasets.BuilderConfig(name="TEST", version=VERSION, description="vasr gold test dataset"),
|
52 |
]
|
53 |
-
IMAGE_EXTENSION = "jpg"
|
54 |
|
55 |
def _info(self):
|
56 |
features = datasets.Features(
|
@@ -94,13 +91,6 @@ class Winogavil(datasets.GeneratorBasedBuilder):
|
|
94 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
95 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
96 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
97 |
-
# data_dir = dl_manager.download_and_extract({
|
98 |
-
# "examples_csv": hf_hub_url(repo_id="nlphuji/vasr", repo_type='dataset', filename="test_gold.csv"),
|
99 |
-
# "images_dir": hf_hub_url(repo_id="nlphuji/vasr", repo_type='dataset',filename="vasr_images.zip")
|
100 |
-
# })
|
101 |
-
|
102 |
-
# return [datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs=data_dir)]
|
103 |
-
# downloaded_files = dl_manager.download_and_extract(_URLS)
|
104 |
data_dir = dl_manager.download_and_extract({
|
105 |
"images_dir": hf_hub_url(repo_id="nlphuji/vasr", repo_type='dataset', filename="vasr_images.zip")
|
106 |
})
|
|
|
38 |
"test": os.path.join(_URL, "test_gold.csv"),
|
39 |
}
|
40 |
|
41 |
+
class Vasr(datasets.GeneratorBasedBuilder):
|
42 |
VERSION = datasets.Version("1.1.0")
|
43 |
|
44 |
# If you need to make complex sub-parts in the datasets with configurable options
|
45 |
# You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
|
46 |
# BUILDER_CONFIG_CLASS = MyBuilderConfig
|
47 |
|
|
|
|
|
48 |
BUILDER_CONFIGS = [
|
49 |
datasets.BuilderConfig(name="TEST", version=VERSION, description="vasr gold test dataset"),
|
50 |
]
|
|
|
51 |
|
52 |
def _info(self):
|
53 |
features = datasets.Features(
|
|
|
91 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
92 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
93 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
data_dir = dl_manager.download_and_extract({
|
95 |
"images_dir": hf_hub_url(repo_id="nlphuji/vasr", repo_type='dataset', filename="vasr_images.zip")
|
96 |
})
|