Download dataset.py from pathii/UiPlus: direct link, hf CLI and curl.
- Browser
- Download file 338 Bytes
-
https://huggingface.co/datasets/pathii/UiPlus/resolve/main/dataset.py
- Command line
-
hf download hf://datasets/pathii/UiPlus/dataset.py
-
curl -L -o dataset.py https://huggingface.co/datasets/pathii/UiPlus/resolve/main/dataset.py
338 Bytes
| import json | |
| with open("data.json", "r") as f: | |
| data = json.load(f) | |
| for entry in data: | |
| assert "id" in entry, f"Missing id in entry {entry}" | |
| assert "html" in entry, f"Missing html in entry {entry['id']}" | |
| assert "image_path" in entry, f"Missing image_path in entry {entry['id']}" | |
| print("Dataset validation passed!") |