fix utils.py bug

This commit is contained in:
Q 2023-09-05 10:38:01 +08:00 committed by GitHub
parent 370bdb6e43
commit a19fc2ebf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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)