Spaces:
Runtime error
Runtime error
import json | |
with open('/mnt/workspace/caixinyu/vicuna/Chinese-Vicuna/sample/instruct/legislation62k.jsonl', 'r') as file: | |
for line in file: | |
try: | |
json_obj = json.loads(line) | |
# 如果解析成功,json_obj 将包含每一行的 JSON 数据 | |
except json.JSONDecodeError as e: | |
print(f"Error in line: {line.strip()}") | |