Download code/multi_vlm2vec_train/case.py from WaitXian/liqi: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/WaitXian/liqi/resolve/main/code/multi_vlm2vec_train/case.py
- Command line
-
hf download hf://WaitXian/liqi/code/multi_vlm2vec_train/case.py
-
curl -L -o case.py https://huggingface.co/WaitXian/liqi/resolve/main/code/multi_vlm2vec_train/case.py
621 Bytes
| import json | |
| with open('/data/oss_bucket_0/liqi/dataset/embedding_pf/bianji_train.json',"r", encoding="utf-8") as f: | |
| data = json.load(f) | |
| number_1 = 0 | |
| number_0 = 0 | |
| print(data[0].keys()) | |
| print(data[0]) | |
| print(data[1]) | |
| print(data[2]) | |
| number = 0 | |
| # for i in data: | |
| # if i['label'] == '0': | |
| # number += 1 | |
| # print(i) | |
| # break | |
| # if i['rn'] == '037a6b4e192533b2e0dc9ab3fb692806': | |
| # number += 1 | |
| # if i['label'] == '0': | |
| # number_0 += 1 | |
| # print(i) | |
| # if i['label'] == '1': | |
| # number_1 += 1 | |
| print(number_0) | |
| print(number_1) | |
| print(number) |