FranciscoLozDataScience commited on
Commit
cdba063
1 Parent(s): 5921684

changed it back

Browse files
Files changed (2) hide show
  1. README.md +4 -0
  2. smokedataset_QA.py +9 -3
README.md CHANGED
@@ -15,6 +15,10 @@ dataset_info:
15
  '0': cloud
16
  '1': other
17
  '2': smoke
 
 
 
 
18
  splits:
19
  - name: test
20
  num_bytes: 119949703
 
15
  '0': cloud
16
  '1': other
17
  '2': smoke
18
+ - name: prompt
19
+ dtype: string
20
+ - name: choices
21
+ sequence: string
22
  splits:
23
  - name: test
24
  num_bytes: 119949703
smokedataset_QA.py CHANGED
@@ -40,7 +40,9 @@ class smokedataset_QA(datasets.GeneratorBasedBuilder):
40
  features= datasets.Features(
41
  {
42
  "image": datasets.Image(),
43
- "label": datasets.ClassLabel(names=_NAMES)
 
 
44
  }
45
  ),
46
  # If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
@@ -69,7 +71,9 @@ class smokedataset_QA(datasets.GeneratorBasedBuilder):
69
  # These kwargs will be passed to _generate_examples
70
  gen_kwargs={
71
  "images": dl_manager.iter_archive(data_dir),
72
- "split": "test"
 
 
73
  },
74
  )
75
  ]
@@ -80,5 +84,7 @@ class smokedataset_QA(datasets.GeneratorBasedBuilder):
80
  label = file_path.split("/")[1]
81
  yield file_path,{
82
  "image": {"path": file_path, "bytes": file_obj.read()},
83
- "label": label
 
 
84
  }
 
40
  features= datasets.Features(
41
  {
42
  "image": datasets.Image(),
43
+ "label": datasets.ClassLabel(names=_NAMES),
44
+ "prompt": datasets.Value(dtype='string'),
45
+ "choices": datasets.Sequence(datasets.Value("string"))
46
  }
47
  ),
48
  # If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and
 
71
  # These kwargs will be passed to _generate_examples
72
  gen_kwargs={
73
  "images": dl_manager.iter_archive(data_dir),
74
+ "split": "test",
75
+ "prompt": _PROMPT,
76
+ "choices": _CHOICES
77
  },
78
  )
79
  ]
 
84
  label = file_path.split("/")[1]
85
  yield file_path,{
86
  "image": {"path": file_path, "bytes": file_obj.read()},
87
+ "label": label,
88
+ "prompt": prompt,
89
+ "choices": choices
90
  }