code: def predict(self, inputs: pd.DataFrame) -> List[str]:
      from mlflow.gateway import query
  
      results = []
      for idx in inputs.index:
          prompt_parameters_as_dict = {
              param.key: inputs[param.key][idx]
              for param in self.prompt_parameters
          }
  
          # copy replacement logic from PromptEngineering.utils.ts for consistency
          prompt = self.prompt_template
          for key, value in prompt_parameters_as_dict.items():
              prompt = re.sub(
                  r"\{\{\s*" + key + r"\s*\}\}", value, prompt
              )
  
          model_parameters_as_dict = {
              param.key: param.value for param in self.model_parameters
          }
          query_data = self._construct_query_data(prompt)
  
          response = query(
              route=self.model_route,
              data={**query_data, **model_parameters_as_dict},
          )
          results.append(self._parse_gateway_response(response))
  
      return results
  
file_path: mlflow/mlflow/promptlab/__init__.py
imports: import os
  import re
  from typing import List
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.version import VERSION
label_desc: Use image node_id 2 for calling the _PromptlabModel obj's underlying member method code with example usage: obj.predict(inputs) and returns: results