The problem is as follows:
Source code: Error in load_model()
self.model = load_model(path_to_model, custom_objects={'f1': f1})
Solution:
Import header file into package:
from keras.models import load_model
Replace with:
from tensorflow.keras.models import load_model