UiPlus / dataset.py
pathii's picture
Upload folder using huggingface_hub
7675d4a verified
raw
history blame contribute delete
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!")