Spaces:
Runtime error
Runtime error
| import json | |
| def create_instruction(sample): | |
| return { | |
| "prompt": sample[0], | |
| "completion": sample[1] | |
| } | |
| # load dataset | |
| with open("../evaluation_kit/dataset/set_v1.0.json") as f: | |
| dataset = json.load(f) | |
| dataset = list(map(create_instruction, dataset)) | |
| with open("finetuning_set_v1.0.json", "w") as f: | |
| json.dump(dataset, f) |