Elron commited on
Commit
a306ac2
1 Parent(s): 1247c04

Upload load.py with huggingface_hub

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