Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
333e5df574
2 changed files with 3 additions and 0 deletions
  1. +2
    -0
      models/ai_model_manage.go
  2. +1
    -0
      routers/repo/ai_model_manage.go

+ 2
- 0
models/ai_model_manage.go View File

@@ -127,6 +127,8 @@ func QueryModelById(id string) (*AiModelManage, error) {
if len(aiModelManageList) == 1 {
log.Info("return a model.")
return aiModelManageList[0], nil
} else {
log.Info("11111")
}
} else {
log.Info("error=" + err.Error())


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

@@ -783,6 +783,7 @@ func QueryModelFileForPredict(ctx *context.Context) {
id := ctx.Query("ID")
model, err := models.QueryModelById(id)
if err == nil {
log.Info("ddddddddddd")
if model.Type == models.TypeCloudBrainTwo {
prefix := model.Path[len(setting.Bucket)+1:]
fileinfos, _ := storage.GetAllObjectByBucketAndPrefix(setting.Bucket, prefix)


Loading…
Cancel
Save