Skip to content

Commit

Permalink
add get pretrained method
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyaoi committed Jan 23, 2019
1 parent 70dc716 commit f006b1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cli/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,11 @@ func InitNewRepo(repoName string) {
bolierplateURL := "https://github.com/cvmodel/bolierplate.git"
CloneFromGit(bolierplateURL, repoName)
}

func GetPretrained(vendorName string, packageName string) []os.FileInfo {
config := readConfig()
localFolder := filepath.Join(config.Local.LocalFolder, vendorName, packageName)
localPretrainedFolder := filepath.Join(localFolder, "pretrained")
files, _ := ioutil.ReadDir(localPretrainedFolder)
return files
}

0 comments on commit f006b1c

Please sign in to comment.