def load(self): """ Load the model from storage """ model_folder = download_model(self.storage_uri) self.model: Data = load_detector(model_folder) self.ready = True
def load(self): """ Load the model from storage """ if "/" in self.storage_uri: model_folder = download_model(self.storage_uri) self.model = pickle.load( open(os.path.join(model_folder, "meta.pickle"), "rb")) else: # Load from locally available models MetricsClass = _load_class_module(self.storage_uri) self.model = MetricsClass() self.ready = True