eliys commited on
Commit
ff817e6
·
verified ·
1 Parent(s): 1f5002d

Fix dataset loading examples

Browse files
Files changed (1) hide show
  1. README.md +35 -6
README.md CHANGED
@@ -82,10 +82,20 @@ Load the complete annotation table:
82
 
83
  ```python
84
  from datasets import load_dataset
 
 
 
 
 
 
 
 
 
85
 
86
  annotations = load_dataset(
87
- "eliys/MObyGaze",
88
- "annotations",
 
89
  split="train",
90
  )
91
  ```
@@ -96,9 +106,21 @@ train/validation/test assignments are stored in `folds.json`.
96
  Load the movie metadata:
97
 
98
  ```python
 
 
 
 
 
 
 
 
 
 
 
99
  movies = load_dataset(
100
- "eliys/MObyGaze",
101
- "movies",
 
102
  split="train",
103
  )
104
  ```
@@ -117,9 +139,16 @@ from huggingface_hub import hf_hub_download
117
  repo_id = "eliys/MObyGaze"
118
  fold_number = 0
119
 
 
 
 
 
 
 
120
  full_dataset = load_dataset(
121
- repo_id,
122
- "annotations",
 
123
  split="train",
124
  )
125
 
 
82
 
83
  ```python
84
  from datasets import load_dataset
85
+ from huggingface_hub import hf_hub_download
86
+
87
+ repo_id = "eliys/MObyGaze"
88
+
89
+ annotations_path = hf_hub_download(
90
+ repo_id=repo_id,
91
+ filename="mobygaze_dataframe.csv",
92
+ repo_type="dataset",
93
+ )
94
 
95
  annotations = load_dataset(
96
+ "csv",
97
+ data_files=annotations_path,
98
+ sep=";",
99
  split="train",
100
  )
101
  ```
 
106
  Load the movie metadata:
107
 
108
  ```python
109
+ from datasets import load_dataset
110
+ from huggingface_hub import hf_hub_download
111
+
112
+ repo_id = "eliys/MObyGaze"
113
+
114
+ movies_path = hf_hub_download(
115
+ repo_id=repo_id,
116
+ filename="mobygaze_movielist.csv",
117
+ repo_type="dataset",
118
+ )
119
+
120
  movies = load_dataset(
121
+ "csv",
122
+ data_files=movies_path,
123
+ sep=",",
124
  split="train",
125
  )
126
  ```
 
139
  repo_id = "eliys/MObyGaze"
140
  fold_number = 0
141
 
142
+ annotations_path = hf_hub_download(
143
+ repo_id=repo_id,
144
+ filename="mobygaze_dataframe.csv",
145
+ repo_type="dataset",
146
+ )
147
+
148
  full_dataset = load_dataset(
149
+ "csv",
150
+ data_files=annotations_path,
151
+ sep=";",
152
  split="train",
153
  )
154