(files)
| 145 | ) |
| 146 | |
| 147 | def download_model(files): |
| 148 | for item in files: |
| 149 | local_path = '/'.join(item.key.split('/')[1:]) |
| 150 | print(local_path) |
| 151 | if item.key.endswith('/') and not os.path.exists(local_path): |
| 152 | os.makedirs(local_path) |
| 153 | else: |
| 154 | cos.Object(args.result_bucket_name, item.key).download_file(local_path) |
| 155 | |
| 156 | download_model(model_web) |
| 157 | download_model(model_ios) |