code: def main():
      args = parser.parse_args()
      pipeline_config_path = find_config(args.config_path)
  
      if args.install or args.mode == "install":
          install_from_config(pipeline_config_path)
      if args.download or args.mode == "download":
          deep_download(pipeline_config_path)
  
      if args.mode == "train":
          train_evaluate_model_from_config(
              pipeline_config_path,
              recursive=args.recursive,
              start_epoch_num=args.start_epoch_num,
          )
      elif args.mode == "evaluate":
          train_evaluate_model_from_config(
              pipeline_config_path,
              to_train=False,
              start_epoch_num=args.start_epoch_num,
          )
      elif args.mode == "interact":
          interact_model(pipeline_config_path)
      elif args.mode == "riseapi":
          start_model_server(
              pipeline_config_path,
              args.https,
              args.key,
              args.cert,
              port=args.port,
          )
      elif args.mode == "risesocket":
          start_socket_server(
              pipeline_config_path,
              args.socket_type,
              port=args.port,
              socket_file=args.socket_file,
          )
      elif args.mode == "predict":
          predict_on_stream(
              pipeline_config_path, args.batch_size, args.file_path
          )
      elif args.mode == "crossval":
          if args.folds < 2:
              log.error("Minimum number of Folds is 2")
          else:
              calc_cv_score(
                  pipeline_config_path, n_folds=args.folds, is_loo=False
              )
  
file_path: DeepPavlov/deeppavlov/deep.py
imports: import argparse
  from logging import getLogger
  from deeppavlov.core.commands.infer import interact_model, predict_on_stream
  from deeppavlov.core.commands.train import train_evaluate_model_from_config
  from deeppavlov.core.common.cross_validation import calc_cv_score
  from deeppavlov.core.common.file import find_config
  from deeppavlov.download import deep_download
  from deeppavlov.utils.pip_wrapper import install_from_config
  from deeppavlov.utils.server import start_model_server
  from deeppavlov.utils.socket import start_socket_server
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types