                                   control_width=12)
              self.tk_vars[opt] = ctl.tk_var
  
      @staticmethod
      def add_refresh_button(parent, refresh_callback):
          """ Add button to refresh the images """
          btn = ttk.Button(parent, text="Update Samples", command=refresh_callback)
          btn.pack(padx=5, pady=5, side=tk.BOTTOM, fill=tk.X, anchor=tk.S)
  
      def add_patch_callback(self, patch_callback):
          """ Add callback to repatch images on action option change """
 
</s> remove         btn.pack(padx=5, pady=5, side=tk.BOTTOM, fill=tk.X, anchor=tk.S)
 </s> add         btn.pack(padx=5, pady=5, side=tk.TOP, fill=tk.X, anchor=tk.N)

    def _add_patch_callback(self, patch_callback):
        """ Add callback to re-patch images on action option change. </s> remove     def add_patch_callback(self, patch_callback):
        """ Add callback to repatch images on action option change """
        for tk_var in self.tk_vars.values():
 </s> add         Parameters
        ----------
        patch_callback: python function
            The function to execute when the images require patching
        """
        for tk_var in self._tk_vars.values(): </s> remove                 tab = ConfigFrame(self,
                                  config_key,
                                  config_dict)
                self.tabs[section][plugin] = tab
                self.tabs[section]["tab"].add(tab, text=plugin.replace("_", " ").title())

    def add_patch_callback(self, patch_callback):
        """ Add callback to repatch images on config option change """
 </s> add                 tab = ConfigFrame(self, config_key, config_dict)
                self._tabs[section][plugin] = tab
                self._tabs[section]["tab"].add(tab, text=plugin.replace("_", " ").title())

    def _add_patch_callback(self, patch_callback):
        """ Add callback to re-patch images on configuration option change.

        Parameters
        ----------
        patch_callback: python function
            The function to execute when the images require patching
        """ </s> remove             choices = [self.format_to_display(choice) for choice in choices]
            ctl = ControlBuilder(parent,
                                 opt,
                                 str,
                                 defaults[opt],
                                 choices=choices,
                                 is_radio=False,
                                 label_width=10,
                                 control_width=12)
            self.tk_vars[opt] = ctl.tk_var
 </s> add             cp_option = ControlPanelOption(title=opt,
                                           dtype=str,
                                           default=defaults[opt],
                                           initial_value=defaults[opt],
                                           choices=choices,
                                           is_radio=False)
            self._tk_vars[opt] = cp_option.tk_var
            cp_options.append(cp_option)
        return cp_options

    @staticmethod
    def _create_mask_choices(defaults, available_masks, has_predicted_mask):
        """ Set the mask choices and default mask based on available masks.

        Parameters
        ----------
        defaults: dict
            The default command line options
        available_masks: list
            The available masks that exist within the alignments file
        has_predicted_mask: bool
            Whether the model was trained with a mask

        Returns
        -------
        list
            The masks that are available to use from the alignments file
        """
        logger.debug("Initial mask choices: %s", available_masks)
        if has_predicted_mask:
            available_masks += ["predicted"]
        if "none" not in available_masks:
            available_masks += ["none"]
        if defaults["mask_type"] not in available_masks:
            logger.debug("Setting default mask to first available: %s", available_masks[0])
            defaults["mask_type"] = available_masks[0]
        logger.debug("Final mask choices: %s", available_masks)
        return available_masks </s> remove     def add_busy_indicator(self, parent):
        """ Place progress bar into bottom bar to indicate when processing """
 </s> add     def _add_busy_indicator(self, parent):
        """ Place progress bar into bottom bar to indicate when processing.

        Parameters
        ----------
        parent: tkinter object
            The tkinter object that holds the busy indicator

        Returns
        -------
        ttk.Progressbar
            A Progress bar to indicate that the Preview tool is busy
        """
    def _add_refresh_button(parent, refresh_callback):
        """ Add a button to refresh the images.

        Parameters
        ----------
        refresh_callback: python function
            The function to execute when the refresh button is pressed
        """
                                   control_width=12)
              self.tk_vars[opt] = ctl.tk_var
  
      @staticmethod
    def _add_refresh_button(parent, refresh_callback):
        """ Add a button to refresh the images.

        Parameters
        ----------
        refresh_callback: python function
            The function to execute when the refresh button is pressed
        """
    def _add_refresh_button(parent, refresh_callback):
        """ Add a button to refresh the images.

        Parameters
        ----------
        refresh_callback: python function
            The function to execute when the refresh button is pressed
        """
          btn = ttk.Button(parent, text="Update Samples", command=refresh_callback)
          btn.pack(padx=5, pady=5, side=tk.BOTTOM, fill=tk.X, anchor=tk.S)
  
      def add_patch_callback(self, patch_callback):
          """ Add callback to repatch images on action option change """
keep keep keep keep 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