Merge pull request #786 from kinghuin/patch-1

fix utils.py bug

Former-commit-id: 26aad616340748e1594a60119ca9434908bf7465
This commit is contained in:
hoshi-hiyouga 2023-09-05 10:49:34 +08:00 committed by GitHub
commit b91fc1f5b3

View File

@ -58,7 +58,7 @@ def get_preview(
if data_file.endswith(".json"):
data = json.load(f)
elif data_file.endswith(".jsonl"):
data = [json.load(line) for line in f]
data = [json.loads(line) for line in f]
else:
data = [line for line in f]
return len(data), data[start:end], gr.update(visible=True)