test_upload / filt_result_by_bleu.py
Chen42's picture
Upload folder using huggingface_hub
41404b8 verified
raw
history blame
311 Bytes
from datasets import load_dataset
import pandas as pd
decoding_res = '/home/zychen/hwproject/my_modeling_phase_1/mytest_3600_test5k/decoding_res.json'
dataset2 = load_dataset("json", data_files=decoding_res)["train"]
print(f"Number of examples: {len(dataset2)}")
decoding_df = dataset2.to_pandas()
decoding_df