Browse Source

提交代码,增加模型数量标签

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.1.2
zouap 3 years ago
parent
commit
805dc92ac5
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      routers/repo/ai_model_manage.go

+ 12
- 0
routers/repo/ai_model_manage.go View File

@@ -474,6 +474,18 @@ func ShowOneVersionOtherModel(ctx *context.Context) {


func ShowModelTemplate(ctx *context.Context) { func ShowModelTemplate(ctx *context.Context) {
ctx.Data["isModelManage"] = true ctx.Data["isModelManage"] = true
repoId := ctx.Repo.Repository.ID
Type := -1
_, count, _ := models.QueryModel(&models.AiModelQueryOptions{
ListOptions: models.ListOptions{
Page: 1,
PageSize: 2,
},
RepoID: repoId,
Type: Type,
New: MODEL_LATEST,
})
ctx.Data["MODEL_COUNT"] = count
ctx.HTML(200, tplModelManageIndex) ctx.HTML(200, tplModelManageIndex)
} }




Loading…
Cancel
Save