def __get_model_dir_from_model_artifacts()

in src/neo_loader/tensorflow_model_loader.py [0:0]


    def __get_model_dir_from_model_artifacts(self) -> Optional[Path]:
        model_dirs = []

        for path in self.model_artifacts:
            if path.is_dir():
                if path.joinpath('variables').exists():
                    model_dirs.append(path)

                if path.joinpath('checkpoint').exists():
                    raise RuntimeError('InputConfiguration: TF Checkpoints are not supported. '
                                       'Please make sure the framework you select is correct.')
        if len(model_dirs) > 1:
            raise RuntimeError('InputConfiguration: Exactly one saved model is allowed for TensorFlow models.')
        elif len(model_dirs) == 1:
            return model_dirs[0]
        else:
            return None