NimaBoscarino commited on
Commit
16fa1a3
1 Parent(s): b854216

Update VIST.py

Browse files
Files changed (1) hide show
  1. VIST.py +4 -2
VIST.py CHANGED
@@ -17,7 +17,7 @@
17
 
18
  import json
19
  import os
20
-
21
  import datasets
22
 
23
 
@@ -44,6 +44,8 @@ _HOMEPAGE = "http://visionandlanguage.net/VIST/dataset.html"
44
  # TODO: Add the licence for the dataset here if you can find it
45
  _LICENSE = ""
46
 
 
 
47
  _URLS = {
48
  "DII": {
49
  "train": "https://huggingface.co/datasets/NimaBoscarino/VIST/resolve/main/data/train.dii.jsonl.zip",
@@ -97,7 +99,7 @@ class VIST(datasets.GeneratorBasedBuilder):
97
  "annotations": datasets.Sequence({
98
  'original_text': datasets.Value("string"),
99
  'photo_order_in_story': datasets.Value("int8"),
100
- 'worker_id': datasets.ClassLabel(names_file="/Users/nima/Work/sandbox/datasets/VIST/dii.worker_ids.csv"),
101
  'text': datasets.Value("string"),
102
  })
103
  })
 
17
 
18
  import json
19
  import os
20
+ from huggingface_hub import hf_hub_download
21
  import datasets
22
 
23
 
 
44
  # TODO: Add the licence for the dataset here if you can find it
45
  _LICENSE = ""
46
 
47
+ _DII_WORKER_IDS = hf_hub_download(repo_type="dataset", repo_id="society-ethics/VIST", filename="data/dii.worker_ids.csv", use_auth_token=True)
48
+
49
  _URLS = {
50
  "DII": {
51
  "train": "https://huggingface.co/datasets/NimaBoscarino/VIST/resolve/main/data/train.dii.jsonl.zip",
 
99
  "annotations": datasets.Sequence({
100
  'original_text': datasets.Value("string"),
101
  'photo_order_in_story': datasets.Value("int8"),
102
+ 'worker_id': datasets.ClassLabel(names_file=_DII_WORKER_IDS),
103
  'text': datasets.Value("string"),
104
  })
105
  })