Datasets:
Update docci.py
Browse files
docci.py
CHANGED
|
@@ -34,7 +34,6 @@ _URL = "https://storage.googleapis.com/docci/data/"
|
|
| 34 |
_URLS = {
|
| 35 |
"descriptions": _URL + "docci_descriptions.jsonlines",
|
| 36 |
"images": _URL + "docci_images.tar.gz",
|
| 37 |
-
"metadata": _URL + "docci_metadata.jsonlines"
|
| 38 |
}
|
| 39 |
|
| 40 |
_URL_AAR = {
|
|
@@ -107,13 +106,6 @@ class DOCCI(datasets.GeneratorBasedBuilder):
|
|
| 107 |
return self._generate_examples_docci_aar(data, split)
|
| 108 |
|
| 109 |
def _generate_examples_docci(self, data, split):
|
| 110 |
-
|
| 111 |
-
# Load the metadata
|
| 112 |
-
with open(data["metadata"], "r") as f:
|
| 113 |
-
metadata = [json.loads(l.strip()) for l in f]
|
| 114 |
-
metadata_d = { metadata}
|
| 115 |
-
|
| 116 |
-
# Load the main data
|
| 117 |
with open(data["descriptions"], "r") as f:
|
| 118 |
examples = [json.loads(l.strip()) for l in f]
|
| 119 |
|
|
|
|
| 34 |
_URLS = {
|
| 35 |
"descriptions": _URL + "docci_descriptions.jsonlines",
|
| 36 |
"images": _URL + "docci_images.tar.gz",
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
_URL_AAR = {
|
|
|
|
| 106 |
return self._generate_examples_docci_aar(data, split)
|
| 107 |
|
| 108 |
def _generate_examples_docci(self, data, split):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
with open(data["descriptions"], "r") as f:
|
| 110 |
examples = [json.loads(l.strip()) for l in f]
|
| 111 |
|