mirror of
https://github.com/qurator-spk/sbb_binarization.git
synced 2025-06-07 19:35:04 +02:00
Small fix to raise an exception when no model was found instead of failing later with TypeError: 'int' object is not subscriptable.
This commit is contained in:
parent
c99be55af2
commit
55a9fba677
1 changed files with 3 additions and 1 deletions
|
@ -34,6 +34,8 @@ class SbbBinarizer:
|
||||||
self.start_new_session()
|
self.start_new_session()
|
||||||
|
|
||||||
self.model_files = glob('%s/*.h5' % self.model_dir)
|
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 = []
|
self.models = []
|
||||||
for model_file in self.model_files:
|
for model_file in self.model_files:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue