parameters: (generated_tensor_data, model_name)
return_statement: return generate_code
docstring: Generate TensorFlow SDK in Python.
  
    Args:
      generated_tensor_data: Example is {"keys": [[1.0], [2.0]], "features": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]]}
docstring_summary: Generate TensorFlow SDK in Python.
docstring_tokens: Generate TensorFlow SDK in Python .
function: def gen_tensorflow_client_string(generated_tensor_data, model_name):
    """
    Generate TensorFlow SDK in Python.
  
    Args:
      generated_tensor_data: Example is {"keys": [[1.0], [2.0]], "features": [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]]}
    """
  
    code_template = """#!/usr/bin/env python
  
  import requests
  
  def main():
    endpoint = "http://127.0.0.1:8500"
    json_data = {"model_name": "{{ model_name }}", "data": {{ tensor_data }} }
    result = requests.post(endpoint, json=json_data)
    print(result.json())
  
  if __name__ == "__main__":
    main()
    """
  
    generated_tensor_data_string = json.dumps(generated_tensor_data)
    template = Template(code_template)
    generate_code = template.render(
        model_name=model_name, tensor_data=generated_tensor_data_string)
    logging.debug("Generate the code in Python:\n{}".format(generate_code))
  
    return generate_code
function_tokens: def gen_tensorflow_client_string ( generated_tensor_data , model_name ) : code_template = """#!/usr/bin/env python
  
  import requests
  
  def main():
    endpoint = "http://127.0.0.1:8500"
    json_data = {"model_name": "{{ model_name }}", "data": {{ tensor_data }} }
    result = requests.post(endpoint, json=json_data)
    print(result.json())
  
  if __name__ == "__main__":
    main()
    """ generated_tensor_data_string = json . dumps ( generated_tensor_data ) template = Template ( code_template ) generate_code = template . render ( model_name = model_name , tensor_data = generated_tensor_data_string ) logging . debug ( "Generate the code in Python:\n{}" . format ( generate_code ) ) return generate_code