Browse Source

Merge branch 'zouap' of https://git.openi.org.cn/OpenI/aiforge into zouap

pull/1036/head
zhoupzh 3 years ago
parent
commit
df25553a9d
2 changed files with 6 additions and 0 deletions
  1. +5
    -0
      routers/repo/ai_model_manage.go
  2. +1
    -0
      routers/routes/routes.go

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

@@ -21,6 +21,7 @@ const (
Model_prefix = "aimodels/"
tplModelManageIndex = "repo/modelmanage/index"
tplModelManageDownload = "repo/modelmanage/download"
tplModelInfo = "repo/modelmanage/showinfo"
MODEL_LATEST = 1
MODEL_NOT_LATEST = 0
)
@@ -347,6 +348,10 @@ func DownloadSingleModelFile(ctx *context.Context) {
}
}

func ShowModelInfo(ctx *context.Context) {
ctx.HTML(200, tplModelInfo)
}

func ShowSingleModel(ctx *context.Context) {
id := ctx.Params(":ID")
parentDir := ctx.Query("parentDir")


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

@@ -973,6 +973,7 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Delete("/delete_model", repo.DeleteModel)
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_api", reqRepoCloudBrainReader, repo.ShowModelPageInfo)
m.Get("/show_model_child_api", reqRepoCloudBrainReader, repo.ShowOneVersionOtherModel)
m.Get("/query_train_job", reqRepoCloudBrainReader, repo.QueryTrainJobList)


Loading…
Cancel
Save