class_docstr: Creates a top row UI with prompts, generate button, styles, extra little buttons for things, and enables some functionality related to their operation
class_docstr_tok: ["Creates","a","top","row","UI","with","prompts",",","generate","button",",","styles",",","extra","little","buttons","for","things",",","and","enables","some","functionality","related","to","their","operation"]
code: def create_tools_row(self):
      with gr.Row(elem_id=f"{self.id_part}_tools"):
          from modules.ui import (
              paste_symbol,
              clear_prompt_symbol,
              restore_progress_symbol,
          )
  
          self.paste = ToolButton(
              value=paste_symbol,
              elem_id="paste",
              tooltip="Read generation parameters from prompt or last generation if prompt is empty into user interface.",
          )
          self.clear_prompt_button = ToolButton(
              value=clear_prompt_symbol,
              elem_id=f"{self.id_part}_clear_prompt",
              tooltip="Clear prompt",
          )
          self.apply_styles = ToolButton(
              value=ui_prompt_styles.styles_materialize_symbol,
              elem_id=f"{self.id_part}_style_apply",
              tooltip="Apply all selected styles to prompts.",
          )
  
          if self.is_img2img:
              self.button_interrogate = ToolButton(
                  "📎",
                  tooltip="Interrogate CLIP - use CLIP neural network to create a text describing the image, and put it into the prompt field",
                  elem_id="interrogate",
              )
              self.button_deepbooru = ToolButton(
                  "📦",
                  tooltip="Interrogate DeepBooru - use DeepBooru neural network to create a text describing the image, and put it into the prompt field",
                  elem_id="deepbooru",
              )
  
          self.restore_progress_button = ToolButton(
              value=restore_progress_symbol,
              elem_id=f"{self.id_part}_restore_progress",
              visible=False,
              tooltip="Restore progress",
          )
  
          self.token_counter = gr.HTML(
              value="<span>0/75</span>",
              elem_id=f"{self.id_part}_token_counter",
              elem_classes=["token-counter"],
          )
          self.token_button = gr.Button(
              visible=False, elem_id=f"{self.id_part}_token_button"
          )
          self.negative_token_counter = gr.HTML(
              value="<span>0/75</span>",
              elem_id=f"{self.id_part}_negative_token_counter",
              elem_classes=["token-counter"],
          )
          self.negative_token_button = gr.Button(
              visible=False,
              elem_id=f"{self.id_part}_negative_token_button",
          )
  
          self.clear_prompt_button.click(
              fn=lambda *x: x,
              _js="confirm_clear_prompt",
              inputs=[self.prompt, self.negative_prompt],
              outputs=[self.prompt, self.negative_prompt],
          )
  
file_path: stable-diffusion-webui/modules/ui_toprow.py
imports: import gradio
  from modules import shared, ui_prompt_styles
  import modules.images
  from modules.ui_components import ToolButton
label_desc: Use image node_id 7 for calling the Toprow obj's underlying member method code with example usage: obj.create_tools_row() without return types