| @@ -1754,6 +1754,19 @@ func InferenceJobIndex(ctx *context.Context) { | |||||
| tasks[i].ComputeResource = models.NPUResource | tasks[i].ComputeResource = models.NPUResource | ||||
| } | } | ||||
| repoId := ctx.Repo.Repository.ID | |||||
| Type := -1 | |||||
| _, model_count, _ := models.QueryModel(&models.AiModelQueryOptions{ | |||||
| ListOptions: models.ListOptions{ | |||||
| Page: 1, | |||||
| PageSize: 2, | |||||
| }, | |||||
| RepoID: repoId, | |||||
| Type: Type, | |||||
| New: MODEL_LATEST, | |||||
| }) | |||||
| ctx.Data["MODEL_COUNT"] = model_count | |||||
| pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5) | pager := context.NewPagination(int(count), setting.UI.IssuePagingNum, page, 5) | ||||
| pager.SetDefaultParams(ctx) | pager.SetDefaultParams(ctx) | ||||
| ctx.Data["Page"] = pager | ctx.Data["Page"] = pager | ||||