chore: added logger and closes #33
This commit is contained in:
@@ -103,11 +103,21 @@ func handleRun(handle *Handle) {
|
||||
|
||||
img_file, err := os.Create(path.Join(run_path, "img.png"))
|
||||
if err != nil {
|
||||
return Error500(nil)
|
||||
return Error500(err)
|
||||
}
|
||||
defer img_file.Close()
|
||||
img_file.Write(file)
|
||||
|
||||
if !testImgForModel(c, model, path.Join(run_path, "img.png")) {
|
||||
LoadDefineTemplate(w, "/models/edit.html", "run-model-card", c.AddMap(AnyMap{
|
||||
"Model": model,
|
||||
"NotFound": false,
|
||||
"Result": nil,
|
||||
"ImageError": true,
|
||||
}))
|
||||
return nil
|
||||
}
|
||||
|
||||
root := tg.NewRoot()
|
||||
|
||||
tf_img := ReadPNG(root, path.Join(run_path, "img.png"), int64(model.ImageMode))
|
||||
|
||||
Reference in New Issue
Block a user