code: def web(config_files, checkpoint, override_params, host, port, debug):
      if debug:
          tf.logging.set_verbosity(tf.logging.DEBUG)
      else:
          tf.logging.set_verbosity(tf.logging.INFO)
  
      if checkpoint:
          config = get_checkpoint_config(checkpoint)
      elif config_files:
          config = get_config(config_files)
      else:
          click.echo(
              "Neither checkpoint not config specified, assuming `accurate`."
          )
          config = get_checkpoint_config("accurate")
  
      if override_params:
          config = override_config_params(config, override_params)
  
      # Bounding boxes will be filtered by frontend (using slider), so we set a
      # low threshold.
      if config.model.type == "fasterrcnn":
          config.model.rcnn.proposals.min_prob_threshold = 0.01
      elif config.model.type == "ssd":
          config.model.proposals.min_prob_threshold = 0.01
      else:
          raise ValueError(
              "Model type '{}' not supported".format(config.model.type)
          )
  
      # Initialize model
      global NETWORK_START_THREAD
      NETWORK_START_THREAD = Thread(
          target=start_network, args=(config,)
      )
      NETWORK_START_THREAD.start()
  
      app.run(host=host, port=port, debug=debug)
  
file_path: luminoth/luminoth/tools/server/web.py
imports: import click
  import tensorflow
  from flask import Flask, jsonify, request, render_template
  from threading import Thread
  from PIL import Image
  from six.moves import _thread
  from luminoth.tools.checkpoint import get_checkpoint_config
  from luminoth.utils.config import get_config, override_config_params
  from luminoth.utils.predicting import PredictorNetwork
label_desc: Use image node_id 5 for calling a global function with example usage: web(config_files, checkpoint, override_params, host, port, debug) without return types