code: def create_text_conditional_figure(
      image: np.ndarray, boxes: np.ndarray, fig_size: int = 900
  ) -> layouts.LayoutDOM:
      """Creates a Bokeh figure for interactive text-conditional detection.
  
      Args:
        image: Image to detect objects in.
        boxes: All predicted boxes for the image, in [cx, cy, w, h] format.
        fig_size: Size of the Bokeh figure in pixels.
  
      Returns:
        The Bokeh layout of the figure.
      """
      plot = _create_image_figure(image, fig_size)
      box_data_source = _plot_boxes(plot, boxes)
      plot_width = (
          plot.width
          if bokeh.__version__ >= "3.0.3"
          else plot.plot_width
      )
  
      # Create div that will display the query legend:
      legend = widgets.Div(text="", height=30, width=plot_width - 35)
  
      # Create text input and register callback:
      text_input = widgets.TextInput(
          value="",
          title="Enter comma-separated queries:",
          width=plot_width - 35,
      )
      text_input.js_on_change(
          "value_input",
          interactive.get_text_input_js_callback(
              box_data_source, legend
          ),
      )
  
      # Assemble and show figure:
      layout = layouts.column(text_input, legend, plot)
      plotting.show(layout)
  
      return layout
  
file_path: scenic/scenic/projects/owl_vit/notebooks/plotting.py
imports: import bokeh
  from bokeh import events
  from bokeh import layouts
  from bokeh import models
  from bokeh import plotting
  from bokeh.models import widgets
  import numpy
  from scenic.model_lib.base_models import box_utils
  from scenic.projects.owl_vit.notebooks import interactive
label_desc: Use image node_id 1 for calling a global function with example usage: create_text_conditional_figure(image, boxes, fig_size) and returns: layout