class_docstr: Handles loading and inference using specific models
docstr: Initialize and load service from input given name, using "services.json" properties file
  
  Args:
      name (str):
          The name of service to upload using server
  
  Returns:
      The loaded service
docstr_tok: ["Initialize","and","load","service","from","input","given","name",",","using","``","services.json","''","properties","file","Args",":","name","(","str",")",":","The","name","of","service","to","upload","using","server","Returns",":","The","loaded","service"]
code: def load_service(self, name):
      """
      Initialize and load service from input given name, using "services.json" properties file
  
      Args:
          name (str):
              The name of service to upload using server
  
      Returns:
          The loaded service
      """
      with open(
          os.path.join(
              os.path.dirname(os.path.realpath(__file__)),
              "services.json",
          )
      ) as prop_file:
          properties = json.load(prop_file)
      folder_path = properties["api_folders_path"]
      service_name_error = (
          "'{0}' is not an existing service - "
          "please try using another service.".format(name)
      )
      if name in properties:
          model_relative_path = properties[name]["file_name"]
      else:
          logger.error(service_name_error)
          raise Exception(service_name_error)
      if not model_relative_path:
          logger.error(service_name_error)
          raise Exception(service_name_error)
      module_path = ".".join(model_relative_path.split(".")[:-1])
      module_name = extract_module_name(model_relative_path)
      module = import_module(folder_path + module_path)
      class_api = getattr(module, module_name)
      upload_service = class_api()
      upload_service.load_model()
      self.service_type = properties[name]["type"]
      self.is_spacy = properties[name].get("spacy", False)
      return upload_service
  
file_path: nlp-architect/server/service.py
imports: import json
  import logging
  import os.path
  from importlib import import_module
  from nlp_architect.utils.io import gzip_str
label_desc: Use image node_id 4 for calling the Service obj's underlying member method code with example usage: obj.load_service(name) and returns: upload_service