class_docstr: Test Class for LeonardoAI Integration Testing.
class_docstr_tok: ["Test","Class","for","LeonardoAI","Integration","Testing","."]
docstr: Test for bulk image processing
docstr_tok: ["Test","for","bulk","image","processing"]
code: def test_bulk_qa(self, mock_handler):
      """Test for bulk image processing"""
      df = pd.DataFrame.from_dict(
          {
              "prompt": [
                  "Abstract artwork with vibrant colors and dynamic shapes. Imagine a world where sound is visible, and each element in the image represents a different genre of music.",
                  "surreal landscape where mountains are made of candy, and rivers flow with liquid gold.",
              ]
          }
      )
      self.set_handler(mock_handler, name="pg", tables={"df": df})
  
      self.run_sql(
          f"""
              CREATE MODEL proj.test_leonardo_bulk_qa
              PREDICT url
              USING
              engine = 'leo_engine',
              model = '6bef9f1b-29cb-40c7-b9df-32b51c1f67d3',
              api_key = '{self.get_api_key('LEONARDO_API_KEY')}',
              prompt_template = '{{text}}, 8K | highly detailed realistic 3d oil painting style cyberpunk by MAD DOG JONES combined with Van Gogh  |  cinematic lighting | happy colors';
              """
      )
      self.wait_predictor("proj", "test_leonardo_bulk_qa")
  
      result_df = self.run_sql(
          """
              SELECT p.answer
              FROM pg.df as t
              JOIN proj.test_leonardo_bulk_qa as p;
              """
      )
      assert "stockholm" in result_df["answer"].iloc[0].lower()
      assert "venus" in result_df["answer"].iloc[1].lower()
  
file_path: mindsdb/tests/unit/ml_handlers/test_leonardo_ai.py
imports: import os
  import pytest
  import pandas
  from unittest.mock import patch
  from .base_ml_test import BaseMLAPITest
label_desc: Use image node_id 6 for calling the TestLeonardoAI obj's underlying member method code with example usage: obj.test_bulk_qa(mock_handler) without return types