Download json_len.py from lhbit20010120/LLaVA_Monkey_Data: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/datasets/lhbit20010120/LLaVA_Monkey_Data/resolve/main/json_len.py
- Command line
-
hf download hf://datasets/lhbit20010120/LLaVA_Monkey_Data/json_len.py
-
curl -L -o json_len.py https://huggingface.co/datasets/lhbit20010120/LLaVA_Monkey_Data/resolve/main/json_len.py
302 Bytes
| import json | |
| # Function to load JSON data from a file | |
| def load_json(file_path): | |
| with open(file_path, 'r') as file: | |
| data = json.load(file) | |
| return data | |
| json_file_path = '/root/Monkey_Data/transformed_train_monkey_select_20_percent.json' | |
| data = load_json(json_file_path) | |
| print(len(data)) |