preliminary usable features
This commit is contained in:
@@ -2,10 +2,16 @@ package backend_golang
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func (a *App) StartServer(strategy string, modelPath string) (string, error) {
|
||||
cmd := exec.Command("cmd-helper", "python", "./backend-python/main.py", strategy, modelPath)
|
||||
func (a *App) StartServer(port int) (string, error) {
|
||||
cmdHelper, err := filepath.Abs("./cmd-helper")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
cmd := exec.Command(cmdHelper, "python", "./backend-python/main.py", strconv.Itoa(port))
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user