用Python程序自制微调数据集 #827
Closed
KevinFanng
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Python程序读取Excel,自制微调数据集,经验证,完成微调。微调过程https://zhuanlan.zhihu.com/p/681326841
Python程序代码如下:
import pandas as pd
import json
def process_excel(file_path, output_json_file):
# 读取 Excel 文件
xls = pd.ExcelFile(file_path)
excel_file_path = '测试.xlsx' # 替换成你的 Excel 文件路径
output_json_file_path = 'train.json' # 替换成你想要保存的 JSON 文件路径
process_excel(excel_file_path, output_json_file_path)
Beta Was this translation helpful? Give feedback.
All reactions