FranciscoLozDataScience commited on
Commit
5921684
1 Parent(s): 90f7b6b

removed prompt and choice to see if dataset viewer will work

Browse files
Files changed (2) hide show
  1. README.md +0 -4
  2. smokedataset_QA.py +3 -9
README.md CHANGED
@@ -15,10 +15,6 @@ dataset_info:
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
 
15
  '0': cloud
16
  '1': other
17
  '2': smoke
 
 
 
 
18
  splits:
19
  - name: test
20
  num_bytes: 119949703
smokedataset_QA.py CHANGED
@@ -40,9 +40,7 @@ class smokedataset_QA(datasets.GeneratorBasedBuilder):
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,9 +69,7 @@ class smokedataset_QA(datasets.GeneratorBasedBuilder):
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,7 +80,5 @@ class smokedataset_QA(datasets.GeneratorBasedBuilder):
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
  }
 
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
  # 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
  label = file_path.split("/")[1]
81
  yield file_path,{
82
  "image": {"path": file_path, "bytes": file_obj.read()},
83
+ "label": label
 
 
84
  }