|
|
@@ -1765,8 +1765,8 @@ func InferenceJobIndex(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
//判断权限 |
|
|
|
canNewJob, _ := canUserCreateTrainJobVersion(ctx, tasks[0].UserID) |
|
|
|
if !canNewJob { |
|
|
|
canDownload, _ := canUserCreateTrainJobVersion(ctx, tasks[0].UserID) |
|
|
|
if !canDownload { |
|
|
|
ctx.ServerError("user can not download", err) |
|
|
|
return |
|
|
|
} |
|
|
@@ -1779,7 +1779,7 @@ func InferenceJobIndex(ctx *context.Context) { |
|
|
|
ctx.Data["Tasks"] = tasks |
|
|
|
ctx.Data["CanCreate"] = cloudbrain.CanCreateOrDebugJob(ctx) |
|
|
|
ctx.Data["RepoIsEmpty"] = repo.IsEmpty |
|
|
|
ctx.Data["canNewJob"] = canNewJob |
|
|
|
ctx.Data["canDownload"] = canDownload |
|
|
|
ctx.HTML(200, tplModelArtsInferenceJobIndex) |
|
|
|
} |
|
|
|
func InferenceJobNew(ctx *context.Context) { |
|
|
|