lenagibee commited on
Commit
673d94c
·
verified ·
1 Parent(s): f1d001d

Upload GenDocVQA2024.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. GenDocVQA2024.py +12 -9
GenDocVQA2024.py CHANGED
@@ -34,7 +34,7 @@ _URLS = {
34
 
35
  _LICENSE = "Other"
36
 
37
- class GenDocVQA2024Small(datasets.GeneratorBasedBuilder):
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(feature={"text": datasets.Value("string"), "bbox": datasets.Sequence(datasets.Value("int64")),
53
- 'block_id': datasets.Value("int64"),
54
- 'text_id': datasets.Value("int64"),
55
- 'par_id': datasets.Value("int64"),
56
- 'line_id': datasets.Value("int64"),
57
- 'word_id': datasets.Value("int64")
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