improve train_log.txt creation

This commit is contained in:
josc146 2023-12-22 13:00:13 +08:00
parent b988694da7
commit 2e0a542f33

View File

@ -50,10 +50,13 @@ func (a *App) OnStartup(ctx context.Context) {
os.Mkdir(a.exDir+"models", os.ModePerm)
os.Mkdir(a.exDir+"lora-models", os.ModePerm)
os.Mkdir(a.exDir+"finetune/json2binidx_tool/data", os.ModePerm)
f, err := os.Create(a.exDir + "lora-models/train_log.txt")
trainLogPath := a.exDir + "lora-models/train_log.txt"
if !a.FileExists(trainLogPath) {
f, err := os.Create(trainLogPath)
if err == nil {
f.Close()
}
}
a.downloadLoop()
a.midiLoop()