                      for arg in args]
          logger.debug("Built cli arguments: (%s)", args)
          return args
  
      def _get_training_session_info(self, cli_option):
          """ Set the model folder and model name to :`attr:_training_session_location` so the global
          session picks them up for logging to the graph and analysis tab.
  
          Parameters
          ----------
 
</s> remove         cli_option: list
 </s> add         cli_option: list[str] </s> remove     def build_args(self, category, command=None, generate=False):
 </s> add     def _build_args(self,
                    category: str,
                    command: str | None = None,
                    generate: bool = False) -> list[str]: </s> remove             self.command = command
            args = self.prepare(category)
            self.task.execute_script(command, args)
        self.tk_vars.action_command.set("")

    def generate_command(self, *args):
        """ Generate the command line arguments and output """
        if not self.tk_vars.generate_command.get():
 </s> add             self._command = command
            fs_args = self._prepare(T.cast(T.Literal["faceswap", "tools"], category))
            self._task.execute_script(command, fs_args)
        self._tk_vars.action_command.set("")

    def _generate_command(self,  # pylint:disable=unused-argument
                          *args: tuple[str, str, str]) -> None:
        """ Callback for when the Generate button is pressed. Process command line options and
        output the cli command

        Parameters
        ----------
        args:
            tuple[str, str, str]
                Tkinter variable callback args. Required but unused
        """
        if not self._tk_vars.generate_command.get(): </s> remove         category, command = self.tk_vars.generate_command.get().split(",")
        args = self.build_args(category, command=command, generate=True)
        self.tk_vars.console_clear.set(True)
        logger.debug(" ".join(args))
        print(" ".join(args))
        self.tk_vars.generate_command.set("")

    def prepare(self, category):
        """ Prepare the environment for execution """
 </s> add         category, command = self._tk_vars.generate_command.get().split(",")
        fs_args = self._build_args(category, command=command, generate=True)
        self._tk_vars.console_clear.set(True)
        logger.debug(" ".join(fs_args))
        print(" ".join(fs_args))
        self._tk_vars.generate_command.set("")

    def _prepare(self, category: T.Literal["faceswap", "tools"]) -> list[str]:
        """ Prepare the environment for execution, Sets the 'running task' and 'console clear'
        global tkinter variables. If training, sets the 'is training' variable

        Parameters
        ----------
        category: str, ["faceswap", "tools"]
            The script that is executing the command

        Returns
        -------
        list[str]
            The command line arguments to execute for the faceswap job
        """
    def _get_training_session_info(self, cli_option: list[str]) -> None:
                      for arg in args]
          logger.debug("Built cli arguments: (%s)", args)
          return args
  
    def _get_training_session_info(self, cli_option: list[str]) -> None:
          """ Set the model folder and model name to :`attr:_training_session_location` so the global
          session picks them up for logging to the graph and analysis tab.
  
          Parameters
          ----------
keep keep keep keep replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py