code: def test_llava_client():
      file = "models/wizard.jpg"
      llava_model = os.getenv(
          "H2OGPT_LLAVA_MODEL", "http://192.168.1.46:7861"
      )
      # prompt = "According to the image, describe the image in full details with a well-structured response."
      prompt = "Describe the image"
  
      from src.vision.utils_vision import png_to_base64
  
      img_str = png_to_base64(file)
  
      from gradio_client import Client
  
      client = Client(llava_model, serialize=False)
      client.predict(api_name="/demo_load")
  
      # test_file_local, test_file_server = client.predict(file_to_upload, api_name='/upload_api')
  
      image_process_mode = "Default"
      include_image = False
      res1 = client.predict(
          prompt,
          img_str,
          image_process_mode,
          include_image,
          api_name="/textbox_api_btn",
      )
  
      model_selector, temperature, top_p, max_output_tokens = (
          "llava-v1.5-13b",
          0.2,
          0.7,
          512,
      )
      res = client.predict(
          model_selector,
          temperature,
          top_p,
          max_output_tokens,
          include_image,
          api_name="/textbox_api_submit",
      )
      res = res[-1][-1]
      print(res)
      assert "pumpkins" in res
  
      model_selector, temperature, top_p, max_output_tokens = (
          "Nous-Hermes-2-Vision",
          0.2,
          0.7,
          512,
      )
      res = client.predict(
          model_selector,
          temperature,
          top_p,
          max_output_tokens,
          include_image,
          api_name="/textbox_api_submit",
      )
      res = res[-1][-1]
      print(res)
      assert "headband" in res or "woman" in res or "orange" in res
  
file_path: h2ogpt/tests/test_vision.py
imports: import os
  import time
  from tests.utils import wrap_test_forked
label_desc: Use image node_id 1 for calling a global function with example usage: test_llava_client() without return types