You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#@title 生成验证集文件列表
import random
def cut_and_paste(train_file_path, eval_file_path):
with open(train_file_path, 'r') as f:
lines = f.readlines()
random_lines = random.sample(lines, 5)
with open(eval_file_path, 'w') as f:
f.write('')
with open(eval_file_path, 'a') as f:
for line in random_lines:
f.write(line)
cut_and_paste('/content/lora-svc/filelists/train.txt', '/content/lora-svc/filelists/eval.txt')
The text was updated successfully, but these errors were encountered: