diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index b1ebe9478..2139df236 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -16,8 +16,9 @@ import ( ) const ( - Model_prefix = "aimodels/" - tplModelManageIndex = "repo/modelmanage/index" + Model_prefix = "aimodels/" + tplModelManageIndex = "repo/modelmanage/index" + tplModelManageDownload = "repo/modelmanage/download" ) func SaveModelByParameters(jobId string, name string, version string, label string, description string, userId int64) error { @@ -210,6 +211,7 @@ func ShowSingleModel(ctx *context.Context) { ctx.Data["Dirs"] = models ctx.Data["task"] = task ctx.Data["ID"] = id + ctx.HTML(200, tplModelManageDownload) } @@ -240,7 +242,7 @@ func ShowModelPageInfo(ctx *context.Context) { ctx.Data["Page"] = pager ctx.Data["PageIsCloudBrain"] = true ctx.Data["Tasks"] = modelResult - ctx.HTML(200, tplModelManageIndex) + } func ModifyModel(id string, description string) error { diff --git a/templates/repo/modelmanage/download.tmpl b/templates/repo/modelmanage/download.tmpl new file mode 100644 index 000000000..495e2e371 --- /dev/null +++ b/templates/repo/modelmanage/download.tmpl @@ -0,0 +1,59 @@ +{{template "base/head" .}} +