jamarks commited on
Commit
642fb36
1 Parent(s): 7830d46

Update fiftyone.py

Browse files
Files changed (1) hide show
  1. fiftyone.py +3 -0
fiftyone.py CHANGED
@@ -1,9 +1,12 @@
1
  import fiftyone as fo
2
  import fiftyone.utils.hf_hub as fouh
 
3
 
4
  class FashionopediaLoader(fouh.BaseHuggingFaceLoader):
5
 
6
  def load(self):
 
 
7
  if "name" in self.kwargs:
8
  self.kwargs.pop("name")
9
  dataset = fo.Dataset(name="fashionopedia-val", **self.kwargs)
 
1
  import fiftyone as fo
2
  import fiftyone.utils.hf_hub as fouh
3
+ import datasets
4
 
5
  class FashionopediaLoader(fouh.BaseHuggingFaceLoader):
6
 
7
  def load(self):
8
+ if isinstance(self.hf_dataset, datasets.DatasetDict):
9
+ self.hf_dataset = self.hf_dataset['val']
10
  if "name" in self.kwargs:
11
  self.kwargs.pop("name")
12
  dataset = fo.Dataset(name="fashionopedia-val", **self.kwargs)