  
      def refresh(self, *args):
          """ Refresh the display """
          logger.trace("Refreshing swapped faces. args: %s", args)
          self.tk_vars["busy"].set(True)
          self.config_tools.update_config()
          with self.lock:
              self.patch.converter_arguments = self.cli_frame.convert_args
              self.patch.current_config = self.config_tools.config
          self.patch.trigger.set()
          logger.trace("Refreshed swapped faces")
  
      def build_ui(self):
          """ Build the UI elements for displaying preview and options """
          container = tk.PanedWindow(self.root,
 
</s> remove     def build_ui(self):
        """ Build the UI elements for displaying preview and options """
        container = tk.PanedWindow(self.root,
 </s> add     def _build_ui(self):
        """ Build the elements for displaying preview images and options panels. """
        container = tk.PanedWindow(self, </s> remove     def refresh(self, *args):
        """ Refresh the display """
 </s> add     def _refresh(self, *args):
        """ Load new faces to display in preview.

        Parameters
        ----------
        *args: tuple
            Unused, but required for tkinter callback.
        """ </s> remove         """ The preview process """
        self.build_ui()
        self.root.mainloop()
 </s> add         """ The entry point for the Preview tool from :file:`lib.tools.cli`.

        Launch the tkinter preview Window and run main loop.
        """
        self._build_ui()
        self.mainloop() </s> remove             self.feed_swapped_faces(patch_queue_in, samples)
            with self.lock:
                self.update_converter_arguments()
                self.converter.reinitialize(config=self.current_config)
            swapped = self.patch_faces(patch_queue_in, patch_queue_out, samples.sample_size)
            with self.lock:
                self.display.destination = swapped
 </s> add             self._feed_swapped_faces(patch_queue_in, samples)
            with self._lock:
                self._update_converter_arguments()
                self._converter.reinitialize(config=self.current_config)
            swapped = self._patch_faces(patch_queue_in, patch_queue_out, samples.sample_size)
            with self._lock:
                self._display.destination = swapped </s> remove     def patch_faces(self, queue_in, queue_out, sample_size):
        """ Patch faces """
 </s> add     def _patch_faces(self, queue_in, queue_out, sample_size):
        """ Patch faces.

        Run the convert process on the swapped faces and return the patched faces.

        patch_queue_in: :class:`queue.Queue`
            The input queue for the patching process
        queue_out: :class:`queue.Queue`
            The output queue from the patching process
        sample_size: int
            The number of samples to be displayed

        Returns
        -------
        list
            The swapped faces patched with the selected convert settings
        """
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
  
      def refresh(self, *args):
          """ Refresh the display """
          logger.trace("Refreshing swapped faces. args: %s", args)
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
        self._tk_vars["busy"].set(True)
        self._config_tools.update_config()
        with self._lock:
            self._patch.converter_arguments = self._cli_frame.convert_args
            self._patch.current_config = self._config_tools.config
        self._patch.trigger.set()
          logger.trace("Refreshed swapped faces")
  
      def build_ui(self):
          """ Build the UI elements for displaying preview and options """
          container = tk.PanedWindow(self.root,
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Smart Masks to Convert (#957)

- scripts.convert - Use Smart Masks for Convert
    * Make on-the-fly conversion an explicit option

- Move BlurMask to lib.faces_detect

- tools.preview - Fix for smart masks
    * Subclass from tk.Tk
    * Options to lib.gui.control_helper
    *variable cleanup

- lib.logger - Demote more tensorflow deprecation messages

- Documentation:
    * lib.faces_detect.BlurMask
    * plugins.convert.mask
    * lib.convert
    * scripts.convert
    * scripts.fsmedia
    * tools.preview 
tools/preview.py