code: def loadModel(
      url="https://github.com/serengil/deepface_models/releases/download/v1.0/age_model_weights.h5",
  ) -> Model:
      model = VGGFace.baseModel()
  
      # --------------------------
  
      classes = 101
      base_model_output = Sequential()
      base_model_output = Convolution2D(
          classes, (1, 1), name="predictions"
      )(model.layers[-4].output)
      base_model_output = Flatten()(base_model_output)
      base_model_output = Activation("softmax")(base_model_output)
  
      # --------------------------
  
      age_model = Model(inputs=model.input, outputs=base_model_output)
  
      # --------------------------
  
      # load weights
  
      home = functions.get_deepface_home()
  
      if (
          os.path.isfile(
              home + "/.deepface/weights/age_model_weights.h5"
          )
          != True
      ):
          logger.info("age_model_weights.h5 will be downloaded...")
  
          output = home + "/.deepface/weights/age_model_weights.h5"
          gdown.download(url, output, quiet=False)
  
      age_model.load_weights(
          home + "/.deepface/weights/age_model_weights.h5"
      )
  
      return age_model
  
file_path: deepface/deepface/extendedmodels/Age.py
imports: import os
  import gdown
  import numpy
  import tensorflow
  from deepface.basemodels import VGGFace
  from deepface.commons import functions
  from deepface.commons.logger import Logger
label_desc: Use image node_id 1 for calling a global function with example usage: loadModel(url) and returns: age_model