(self, model_file=MODEL_FILE)
| 32 | |
| 33 | class ModelManager: |
| 34 | def __init__(self, model_file=MODEL_FILE) -> None: |
| 35 | self.all_models = {} |
| 36 | self.model_file = model_file |
| 37 | self.cc = "cc{}{}".format(cc_major, cc_minor) |
| 38 | if not os.path.exists(model_file): |
| 39 | warning("Model file does not exist. Creating new one.") |
| 40 | else: |
| 41 | self.all_models = self.read_json() |
| 42 | |
| 43 | self.update() |
| 44 | |
| 45 | @staticmethod |
| 46 | def get_onnx_path(model_name): |