RWKV-Runner/backend-golang/rwkv.go
2023-05-13 23:36:30 +08:00

15 lines
318 B
Go

package backend_golang
import (
"os/exec"
)
func (a *App) StartServer(strategy string, modelPath string) (string, error) {
cmd := exec.Command("cmd-helper", "python", "./backend-python/main.py", strategy, modelPath)
out, err := cmd.CombinedOutput()
if err != nil {
return "", err
}
return string(out), nil
}