Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 3 years ago
parent
commit
f4831de516
2 changed files with 9 additions and 4 deletions
  1. +8
    -4
      routers/repo/ai_model_manage.go
  2. +1
    -0
      routers/routes/routes.go

+ 8
- 4
routers/repo/ai_model_manage.go View File

@@ -372,10 +372,14 @@ func ShowSingleModel(ctx *context.Context) {
log.Info("get model file,size=" + fmt.Sprint(len(models)))
}

ctx.Data["Dirs"] = models
ctx.Data["task"] = task
ctx.Data["ID"] = id
ctx.HTML(200, tplModelManageDownload)
if err != nil {
ctx.ServerError("QueryTrainJobList:", err)
} else {
mapInterface := make(map[string]interface{})
mapInterface["task"] = task
mapInterface["models"] = models
ctx.JSON(http.StatusOK, mapInterface)
}
}

func ShowOneVersionOtherModel(ctx *context.Context) {


+ 1
- 0
routers/routes/routes.go View File

@@ -974,6 +974,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Put("/modify_model", repo.ModifyModelInfo)
m.Get("/show_model", reqRepoCloudBrainReader, repo.ShowModelTemplate)
m.Get("/show_model_info", reqRepoCloudBrainReader, repo.ShowModelInfo)
m.Get("/show_model_info_api", reqRepoCloudBrainReader, repo.ShowSingleModel)
m.Get("/show_model_api", reqRepoCloudBrainReader, repo.ShowModelPageInfo)
m.Get("/show_model_child_api", reqRepoCloudBrainReader, repo.ShowOneVersionOtherModel)
m.Get("/query_train_job", reqRepoCloudBrainReader, repo.QueryTrainJobList)


Loading…
Cancel
Save