my-wikihow-dataset / count.py
StarThomas1002's picture
Upload folder using huggingface_hub
4c895ac verified
raw
history blame
327 Bytes
import json
# Path to your JSON file
file_path = '/home/yiyangai/stephenqs/datasets/Wikipedia-Knowledge-2M/Wikipedia_2M.json'
# Load the JSON data
with open(file_path, 'r') as f:
data = json.load(f)
# Count the number of examples
num_examples = len(data)
print(f'The number of examples in the file is: {num_examples}')