Datasets:
Update vtqa2023.py
Browse files- vtqa2023.py +4 -0
vtqa2023.py
CHANGED
|
@@ -105,6 +105,9 @@ class VTQAConfig(datasets.BuilderConfig):
|
|
| 105 |
|
| 106 |
@property
|
| 107 |
def features(self):
|
|
|
|
|
|
|
|
|
|
| 108 |
if self.name == "all":
|
| 109 |
lang, image_type = "all", "all"
|
| 110 |
elif "-" in self.name:
|
|
@@ -113,6 +116,7 @@ class VTQAConfig(datasets.BuilderConfig):
|
|
| 113 |
lang, image_type = self.name, "all"
|
| 114 |
elif self.name in ["image", "region", "grid"]:
|
| 115 |
lang, image_type = "all", self.name
|
|
|
|
| 116 |
self.lang, self.image_type = lang, image_type
|
| 117 |
|
| 118 |
btf = _BASE_TEXT_FEATURES["cws"] if self.use_cws else _BASE_TEXT_FEATURES["raw"]
|
|
|
|
| 105 |
|
| 106 |
@property
|
| 107 |
def features(self):
|
| 108 |
+
# 设置默认值
|
| 109 |
+
lang, image_type = "all", "all"
|
| 110 |
+
|
| 111 |
if self.name == "all":
|
| 112 |
lang, image_type = "all", "all"
|
| 113 |
elif "-" in self.name:
|
|
|
|
| 116 |
lang, image_type = self.name, "all"
|
| 117 |
elif self.name in ["image", "region", "grid"]:
|
| 118 |
lang, image_type = "all", self.name
|
| 119 |
+
|
| 120 |
self.lang, self.image_type = lang, image_type
|
| 121 |
|
| 122 |
btf = _BASE_TEXT_FEATURES["cws"] if self.use_cws else _BASE_TEXT_FEATURES["raw"]
|