Upload finetune_data.py with huggingface_hub
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
| 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 |
|