From aec6ad636abfe2edc49b4d5fac3b9a4d8430d1b9 Mon Sep 17 00:00:00 2001 From: josc146 Date: Sun, 9 Jul 2023 12:10:14 +0800 Subject: [PATCH] chore --- backend-golang/app.go | 8 ++++++++ main.go | 9 --------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/backend-golang/app.go b/backend-golang/app.go index 46e0110..34c7f73 100644 --- a/backend-golang/app.go +++ b/backend-golang/app.go @@ -41,6 +41,14 @@ func (a *App) OnStartup(ctx context.Context) { a.cmdPrefix = "cd " + a.exDir + " && " } + 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") + if err == nil { + f.Close() + } + a.downloadLoop() watcher, err := fsnotify.NewWatcher() diff --git a/main.go b/main.go index 7b4a0f5..3322288 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "embed" - "os" "runtime/debug" "strings" @@ -35,14 +34,6 @@ func main() { backend.CopyEmbed(cyacInfo) backend.CopyEmbed(py) backend.CopyEmbed(finetune) - os.Mkdir("models", os.ModePerm) - os.Mkdir("lora-models", os.ModePerm) - os.Mkdir("finetune/json2binidx_tool/data", os.ModePerm) - } - - f, err := os.Create("lora-models/train_log.txt") - if err == nil { - f.Close() } // Create an instance of the app structure