Datasets:
Upload GenDocVQA2024.py with huggingface_hub
Browse files- GenDocVQA2024.py +12 -9
GenDocVQA2024.py
CHANGED
|
@@ -34,7 +34,7 @@ _URLS = {
|
|
| 34 |
|
| 35 |
_LICENSE = "Other"
|
| 36 |
|
| 37 |
-
class
|
| 38 |
|
| 39 |
VERSION = datasets.Version("1.0.0")
|
| 40 |
|
|
@@ -49,13 +49,17 @@ class GenDocVQA2024Small(datasets.GeneratorBasedBuilder):
|
|
| 49 |
{
|
| 50 |
"unique_id": datasets.Value("int64"),
|
| 51 |
"image_path": datasets.Value("string"),
|
| 52 |
-
"ocr": datasets.Sequence(
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
"question": datasets.Value("string"),
|
| 60 |
"answer": datasets.Sequence(datasets.Value("string")),
|
| 61 |
|
|
@@ -63,7 +67,6 @@ class GenDocVQA2024Small(datasets.GeneratorBasedBuilder):
|
|
| 63 |
)
|
| 64 |
|
| 65 |
return datasets.DatasetInfo(
|
| 66 |
-
|
| 67 |
features=features,
|
| 68 |
description=_DESCRIPTION,
|
| 69 |
license=_LICENSE
|
|
|
|
| 34 |
|
| 35 |
_LICENSE = "Other"
|
| 36 |
|
| 37 |
+
class GenDocVQA2024(datasets.GeneratorBasedBuilder):
|
| 38 |
|
| 39 |
VERSION = datasets.Version("1.0.0")
|
| 40 |
|
|
|
|
| 49 |
{
|
| 50 |
"unique_id": datasets.Value("int64"),
|
| 51 |
"image_path": datasets.Value("string"),
|
| 52 |
+
"ocr": datasets.Sequence(
|
| 53 |
+
feature={
|
| 54 |
+
'text': datasets.Value("string"),
|
| 55 |
+
'bbox': datasets.Sequence(datasets.Value("int64")),
|
| 56 |
+
'block_id': datasets.Value("int64"),
|
| 57 |
+
'text_id': datasets.Value("int64"),
|
| 58 |
+
'par_id': datasets.Value("int64"),
|
| 59 |
+
'line_id': datasets.Value("int64"),
|
| 60 |
+
'word_id': datasets.Value("int64")
|
| 61 |
+
}
|
| 62 |
+
),
|
| 63 |
"question": datasets.Value("string"),
|
| 64 |
"answer": datasets.Sequence(datasets.Value("string")),
|
| 65 |
|
|
|
|
| 67 |
)
|
| 68 |
|
| 69 |
return datasets.DatasetInfo(
|
|
|
|
| 70 |
features=features,
|
| 71 |
description=_DESCRIPTION,
|
| 72 |
license=_LICENSE
|