Download examples/load_hub.py from PureOne/Avenyra-Geometric-Memory-Physics: direct link, hf CLI and curl.
- Browser
- Download file 651 Bytes
-
https://huggingface.co/datasets/PureOne/Avenyra-Geometric-Memory-Physics/resolve/main/examples/load_hub.py
- Command line
-
hf download hf://datasets/PureOne/Avenyra-Geometric-Memory-Physics/examples/load_hub.py
-
curl -L -o load_hub.py https://huggingface.co/datasets/PureOne/Avenyra-Geometric-Memory-Physics/resolve/main/examples/load_hub.py
651 Bytes
| #!/usr/bin/env python3 | |
| """Optional loader for an actually published repository; not run during packaging.""" | |
| import argparse | |
| def main(): | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--repo-id", required=True) | |
| parser.add_argument("--config", default="claims") | |
| parser.add_argument("--revision", required=True, help="Actual immutable Hub commit or release revision") | |
| args = parser.parse_args() | |
| from datasets import load_dataset | |
| data = load_dataset(args.repo_id, name=args.config, split="test", revision=args.revision) | |
| print(data) | |
| if len(data): | |
| print(data[0]) | |
| if __name__ == "__main__": | |
| main() | |