def __init__(self):
        """
        Sets the models base directory, and initializes some dictionaries.
        Saves the loaded model's hashes to a json file, so the values are saved even though the API went down.
        """
        # dictionary to hold the model instances (model_name: string -> model_instance: AbstractInferenceEngine)
        self.models_dict = {}
        # read from json file and append to dict
        file_name = '/models_hash/model_hash.json'
        file_exists = os.path.exists(file_name)
        if file_exists:
            try:
                with open(file_name) as json_file:
                    self.models_hash_dict = json.load(json_file)
            except:
                self.models_hash_dict = {}
        else:
            with open('/models_hash/model_hash.json', 'w'):
                self.models_hash_dict = {}
        self.labels_hash_dict = {}
        self.base_models_dir = '/models'

        Sets the models base directory, and initializes some dictionaries.
        Saves the loaded model's hashes to a json file, so the values are saved even though the API went down.
        
inference_api/src/main/deep_learning_service.py