This commit is contained in:
josc146
2023-05-13 20:15:18 +08:00
parent ffec039feb
commit 08e024a998
16 changed files with 328 additions and 119 deletions

View File

@@ -4,12 +4,12 @@ import (
"os/exec"
)
func (a *App) StartServer(strategy string, modelPath string) string {
func (a *App) StartServer(strategy string, modelPath string) (string, error) {
//cmd := exec.Command(`explorer`, `/select,`, `e:\RWKV-4-Raven-7B-v10-Eng49%25-Chn50%25-Other1%25-20230420-ctx4096.pth`)
cmd := exec.Command("cmd-helper", "python", "./backend-python/main.py", strategy, modelPath)
out, err := cmd.CombinedOutput()
if err != nil {
return err.Error()
return "", err
}
return string(out)
return string(out), nil
}