Small fix to raise an exception when no model was found instead of failing later with TypeError: 'int' object is not subscriptable.

pull/43/head
Alexander Pacha 2 years ago
parent c99be55af2
commit 55a9fba677

@ -34,7 +34,9 @@ class SbbBinarizer:
self.start_new_session()
self.model_files = glob('%s/*.h5' % self.model_dir)
if not self.model_files:
raise ValueError(f"No models found in {self.model_dir}")
self.models = []
for model_file in self.model_files:
self.models.append(self.load_model(model_file))

Loading…
Cancel
Save