docstr: Create image by text prompts using ErnieVilG model.
  
  :param query: Text to be translated.
  
  Return language type code.
docstr_tok: ["Create","image","by","text","prompts","using","ErnieVilG","model",".",":","param","query",":","Text","to","be","translated",".","Return","language","type","code","."]
code: def recognize(self, query: str):
      """
      Create image by text prompts using ErnieVilG model.
  
      :param query: Text to be translated.
  
      Return language type code.
      """
      # Generate salt and sign
      salt = random.randint(32768, 65536)
      sign = make_md5(self.appid + query + str(salt) + self.appkey)
  
      # Build request
      headers = {"Content-Type": "application/x-www-form-urlencoded"}
      payload = {
          "appid": self.appid,
          "q": query,
          "salt": salt,
          "sign": sign,
      }
  
      # Send request
      try:
          r = requests.post(self.url, params=payload, headers=headers)
          result = r.json()
      except Exception as e:
          error_msg = str(e)
          raise RuntimeError(error_msg)
      if result["error_code"] != 0:
          raise RuntimeError(result["error_msg"])
      return result["data"]["src"]
  
file_path: PaddleHub/modules/text/machine_translation/baidu_language_recognition/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 2 for calling the BaiduLanguageRecognition obj's underlying member method code with example usage: obj.recognize(query) and returns: result