WangZeJun commited on
Commit
2329cc5
·
verified ·
1 Parent(s): a07f93b

Upload finetune_data.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. finetune_data.py +4 -1
finetune_data.py CHANGED
@@ -125,6 +125,9 @@ if __name__ == "__main__":
125
  if len(sent) < 4:
126
  continue
127
  source = do_mask(sent, args)
128
- output.write(json.dumps({"source": source, "target": sent}, ensure_ascii=False))
 
 
 
129
  output.write("\n")
130
 
 
125
  if len(sent) < 4:
126
  continue
127
  source = do_mask(sent, args)
128
+ label = int(source != sent)
129
+ output.write(
130
+ json.dumps({"source": source, "target": sent, "label": label}, ensure_ascii=False)
131
+ )
132
  output.write("\n")
133