mirror of
https://github.com/qurator-spk/sbb_binarization.git
synced 2025-06-26 04:29:55 +02:00
Merge pull request #43 from apacha/fix_no_models_available
Raise error when no models were loaded
This commit is contained in:
commit
2355d0ec8f
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue