load_model: also allow SavedModel directories

pull/52/head
Robert Sachunsky 2 years ago
parent 88d64de67b
commit a69470135a

@ -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:
self.model_files = glob('%s/*/' % self.model_dir)
if not self.model_files: if not self.model_files:
raise ValueError(f"No models found in {self.model_dir}") raise ValueError(f"No models found in {self.model_dir}")

Loading…
Cancel
Save