llm-playground / translate.py
joshcarp
Initial huggingface commit
bcffb9c
import json
with open("HumanEval.jsonl", "r", encoding="utf8") as file:
# read data from HumanEval.jsonl in while loop
# and load it to json
data = [json.loads(line) for line in file]
for elem in data[:1]:
print("prompt:\n", elem["prompt"])
print("entry_point:\n", elem["entry_point"])
print("canonical_solution:\n", elem["canonical_solution"])
print("test:\n", elem["test"])