Upload load.py with huggingface_hub
Browse files
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 |
-
|
11 |
-
return
|
|
|
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()
|