class_docstr: Implementation for subcmd `towhee server`. Start pipelines as services.
class_docstr_tok: ["Implementation","for","subcmd","`","towhee","server","`",".","Start","pipelines","as","services","."]
code: def __call__(self):
      if ":" in self._args.source[0]:
          module, interface = self._args.source[0].split(":")
          file = module + ".py"
          service = self._pservice(file, interface)
      else:
          service = self._rservice(self._args.source)
  
      if self._args.grpc_port:
          self._server = grpc_server.GRPCServer(service)
          self._server.run(self._args.host, int(self._args.grpc_port))
      else:
          self._server = http_server.HTTPServer(service)
          self._server.run(self._args.host, int(self._args.http_port))
  
file_path: towhee/towhee/command/service.py
imports: import sys
  import importlib
  import argparse
  from pathlib import Path
  from towhee.utils.lazy_import import LazyImport
label_desc: Use image node_id 3 for calling the ServerCommand obj's underlying member method code with example usage: obj.__call__() without return types