Elron commited on
Commit
9be434e
1 Parent(s): 420d564

Upload load.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. load.py +2 -2
load.py CHANGED
@@ -7,5 +7,5 @@ from .operator import StreamSource
7
  def load_dataset(source: Union[StreamSource, str]) -> DatasetDict:
8
  assert isinstance(source, (StreamSource, str)), "source must be a StreamSource or a string"
9
  if isinstance(source, str):
10
- artifact, _ = fetch_artifact(source)
11
- return artifact().to_dataset()
 
7
  def load_dataset(source: Union[StreamSource, str]) -> DatasetDict:
8
  assert isinstance(source, (StreamSource, str)), "source must be a StreamSource or a string"
9
  if isinstance(source, str):
10
+ source, _ = fetch_artifact(source)
11
+ return source().to_dataset()