michelecafagna26 commited on
Commit
4129267
1 Parent(s): db79893

Update hl.py

Browse files
Files changed (1) hide show
  1. hl.py +13 -17
hl.py CHANGED
@@ -28,7 +28,7 @@ High-level Dataset
28
  """
29
 
30
  # github link
31
- _HOMEPAGE = ""
32
 
33
  _LICENSE = "Apache 2.0"
34
 
@@ -52,27 +52,21 @@ class HL(datasets.GeneratorBasedBuilder):
52
  "action": datasets.Sequence(datasets.Value("string")),
53
  "rationale": datasets.Sequence(datasets.Value("string")),
54
  "object": datasets.Sequence(datasets.Value("string")),
55
- # "captions": {
56
- # "scene": datasets.Sequence(datasets.Value("string")),
57
- # "action": datasets.Sequence(datasets.Value("string")),
58
- # "rationale": datasets.Sequence(datasets.Value("string")),
59
- # "object": datasets.Sequence(datasets.Value("string")),
60
- # },
61
  "confidence": {
62
  "scene": datasets.Sequence(datasets.Value("float32")),
63
  "action": datasets.Sequence(datasets.Value("float32")),
64
  "rationale": datasets.Sequence(datasets.Value("float32")),
65
  }
66
- # "purity": {
67
- # "scene": datasets.Sequence(datasets.Value("float32")),
68
- # "action": datasets.Sequence(datasets.Value("float32")),
69
- # "rationale": datasets.Sequence(datasets.Value("float32")),
70
- # },
71
- # "diversity": {
72
- # "scene": datasets.Value("float32"),
73
- # "action": datasets.Value("float32"),
74
- # "rationale": datasets.Value("float32"),
75
- # },
76
  }
77
  )
78
  return datasets.DatasetInfo(
@@ -127,5 +121,7 @@ class HL(datasets.GeneratorBasedBuilder):
127
  "rationale": metadata[file_name]['captions']['rationale'],
128
  "object": metadata[file_name]['captions']['object'],
129
  "confidence": metadata[file_name]['confidence'],
 
 
130
  }
131
  idx += 1
 
28
  """
29
 
30
  # github link
31
+ _HOMEPAGE = "https://github.com/michelecafagna26/HL-dataset"
32
 
33
  _LICENSE = "Apache 2.0"
34
 
 
52
  "action": datasets.Sequence(datasets.Value("string")),
53
  "rationale": datasets.Sequence(datasets.Value("string")),
54
  "object": datasets.Sequence(datasets.Value("string")),
 
 
 
 
 
 
55
  "confidence": {
56
  "scene": datasets.Sequence(datasets.Value("float32")),
57
  "action": datasets.Sequence(datasets.Value("float32")),
58
  "rationale": datasets.Sequence(datasets.Value("float32")),
59
  }
60
+ "purity": {
61
+ "scene": datasets.Sequence(datasets.Value("float32")),
62
+ "action": datasets.Sequence(datasets.Value("float32")),
63
+ "rationale": datasets.Sequence(datasets.Value("float32")),
64
+ },
65
+ "diversity": {
66
+ "scene": datasets.Value("float32"),
67
+ "action": datasets.Value("float32"),
68
+ "rationale": datasets.Value("float32"),
69
+ },
70
  }
71
  )
72
  return datasets.DatasetInfo(
 
121
  "rationale": metadata[file_name]['captions']['rationale'],
122
  "object": metadata[file_name]['captions']['object'],
123
  "confidence": metadata[file_name]['confidence'],
124
+ "purity": metadata[file_name]['purity'],
125
+ "diversity": metadata[file_name]['diversity'],
126
  }
127
  idx += 1