From e2fc57ac2445ab3868f9cc663f5c650578879a5f Mon Sep 17 00:00:00 2001 From: josc146 Date: Tue, 11 Jul 2023 12:19:39 +0800 Subject: [PATCH] training: fix data EOL format --- backend-golang/rwkv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-golang/rwkv.go b/backend-golang/rwkv.go index 0bc48ae..27a3b5a 100644 --- a/backend-golang/rwkv.go +++ b/backend-golang/rwkv.go @@ -64,7 +64,7 @@ func (a *App) ConvertData(python string, input string, outputPrefix string, voca if err != nil { return "", err } - textJson, err := json.Marshal(map[string]string{"text": string(textContent)}) + textJson, err := json.Marshal(map[string]string{"text": strings.ReplaceAll(strings.ReplaceAll(string(textContent), "\r\n", "\n"), "\r", "\n")}) if err != nil { return "", err }