feat: closes #24
This commit is contained in:
@@ -110,7 +110,7 @@ func handleRun(handle *Handle) {
|
||||
|
||||
root := tg.NewRoot()
|
||||
|
||||
tf_img := ReadPNG(root, path.Join(run_path, "img.png"), 3)
|
||||
tf_img := ReadPNG(root, path.Join(run_path, "img.png"), int64(model.ImageMode))
|
||||
|
||||
exec_results := tg.Exec(root, []tf.Output{tf_img.Value()}, nil, &tf.SessionOptions{})
|
||||
inputImage, err:= tf.NewTensor(exec_results[0].Value())
|
||||
@@ -130,8 +130,6 @@ func handleRun(handle *Handle) {
|
||||
vi := 0
|
||||
var predictions = results[0].Value().([][]float32)[0]
|
||||
|
||||
fmt.Println(predictions)
|
||||
|
||||
for i, v := range predictions {
|
||||
if v > vmax {
|
||||
vi = i
|
||||
@@ -155,7 +153,6 @@ func handleRun(handle *Handle) {
|
||||
var name string
|
||||
if err = rows.Scan(&name); err != nil { return nil }
|
||||
|
||||
|
||||
LoadDefineTemplate(w, "/models/edit.html", "run-model-card", c.AddMap(AnyMap{
|
||||
"Model": model,
|
||||
"Result": name,
|
||||
|
||||
Reference in New Issue
Block a user