docstr: Run as a command.
docstr_tok: ["Run","as","a","command","."]
code: def run_cmd(self, argvs):
      """
      Run as a command.
      """
      self.parser = argparse.ArgumentParser(
          description="Run the {} module.".format(self.name),
          prog="hub run {}".format(self.name),
          usage="%(prog)s",
          add_help=True,
      )
      self.arg_input_group = self.parser.add_argument_group(
          title="Input options", description="Input data. Required"
      )
      self.add_module_input_arg()
      args = self.parser.parse_args(argvs)
      if args.appid is not None and args.appkey is not None:
          self.appid = args.appid
          self.appkey = args.appkey
      result = self.translate(args.query, args.from_lang, args.to_lang)
      return result
  
file_path: PaddleHub/modules/text/machine_translation/baidu_translate/module.py
imports: import argparse
  import os
  import random
  from hashlib import md5
  from typing import Optional
  import requests
  import paddlehub
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
label_desc: Use image node_id 3 for calling the BaiduTranslate obj's underlying member method code with example usage: obj.run_cmd(argvs) and returns: result