Print the license of a model Args: model_item (dict): model item in the models.json
(model_item: Dict)
| 212 | |
| 213 | @staticmethod |
| 214 | def print_model_license(model_item: Dict): |
| 215 | """Print the license of a model |
| 216 | |
| 217 | Args: |
| 218 | model_item (dict): model item in the models.json |
| 219 | """ |
| 220 | if "license" in model_item and model_item["license"].strip() != "": |
| 221 | print(f" > Model's license - {model_item['license']}") |
| 222 | if model_item["license"].lower() in LICENSE_URLS: |
| 223 | print(f" > Check {LICENSE_URLS[model_item['license'].lower()]} for more info.") |
| 224 | else: |
| 225 | print(" > Check https://opensource.org/licenses for more info.") |
| 226 | else: |
| 227 | print(" > Model's license - No license information available") |
| 228 | |
| 229 | def _download_github_model(self, model_item: Dict, output_path: str): |
| 230 | if isinstance(model_item["github_rls_url"], list): |
no test coverage detected