          logger.debug("Initialized: %s", self.__class__.__name__)
  
      def set_training_callback(self):
          """ Add a callback to update analysis when the training graph is updated """
          get_config().tk_vars["refreshgraph"].trace("w", self.update_current_session)
          get_config().tk_vars["istraining"].trace("w", self.remove_current_session)
  
      def update_current_session(self, *args):  # pylint:disable=unused-argument
          """ Update the current session data on a graph update callback """
          if not get_config().tk_vars["refreshgraph"].get():
              return
 
</s> remove     def set_training_callback(self):
 </s> add     def set_callbacks(self): </s> remove         self.set_training_callback()
 </s> add         self.set_callbacks() </s> remove         """ Set a tk boolean var to callback when graph is ready to build """
 </s> add         """ Set a tkinter Boolean var to callback when graph is ready to build """ </s> remove     def load_session(self):
 </s> add     def populate_from_folder(self, *args):  # pylint:disable=unused-argument
        """ Populate the Analysis tab from just a model folder. Triggered
        when tkinter variable ``analysis_folder`` is set.
        """
        folder = get_config().tk_vars["analysis_folder"].get()
        if not folder or not os.path.isdir(folder):
            logger.debug("Not a valid folder")
            self.clear_session()
            return

        state_files = [fname
                       for fname in os.listdir(folder)
                       if fname.endswith("_state.json")]
        if not state_files:
            logger.debug("No state files found in folder: '%s'", folder)
            self.clear_session()
            return

        state_file = state_files[0]
        if len(state_files) > 1:
            logger.debug("Multiple models found. Selecting: '%s'", state_file)

        if self.thread is None:
            self.load_session(fullpath=os.path.join(folder, state_file))

    def load_session(self, fullpath=None): </s> remove     def close_app(self):
 </s> add     def rebuild(self):
        """ Rebuild the GUI on config change """
        logger.debug("Redrawing GUI")
        session_state = self._last_session.to_dict()
        self._config.refresh_config()
        get_images().__init__()
        self.set_fonts()
        self.build_gui(rebuild=True)
        if session_state is not None:
            self._last_session.from_dict(session_state)
        logger.debug("GUI Redrawn")

    def close_app(self, *args):  # pylint: disable=unused-argument
        tkv = get_config().tk_vars
        tkv["refreshgraph"].trace("w", self.update_current_session)
        tkv["istraining"].trace("w", self.remove_current_session)
        tkv["analysis_folder"].trace("w", self.populate_from_folder)
          logger.debug("Initialized: %s", self.__class__.__name__)
  
      def set_training_callback(self):
          """ Add a callback to update analysis when the training graph is updated """
        tkv = get_config().tk_vars
        tkv["refreshgraph"].trace("w", self.update_current_session)
        tkv["istraining"].trace("w", self.remove_current_session)
        tkv["analysis_folder"].trace("w", self.populate_from_folder)
        tkv = get_config().tk_vars
        tkv["refreshgraph"].trace("w", self.update_current_session)
        tkv["istraining"].trace("w", self.remove_current_session)
        tkv["analysis_folder"].trace("w", self.populate_from_folder)
  
      def update_current_session(self, *args):  # pylint:disable=unused-argument
          """ Update the current session data on a graph update callback """
          if not get_config().tk_vars["refreshgraph"].get():
              return
keep keep keep keep replace replace keep keep keep keep keep
 GUI Updates (#940)

* lib.gui: Update icons
* tools.cli: Add video filetype flag to mask input
* lib.gui.popup_configure: Refresh GUI on config save
* lib.gui._config: Add Icon size and load last session options
* lib.gui.control_helper - Add control modification tracking
* lib.gui - Add Projects and Last Session
- Main root title handled by projects
- Add Hotkeys
- Create projects module
- split fsw and fst filetypes
- Add last_session saving

* lib.project
- Documentation
- Ask confirm on closing unsaved project
-Fixups

* Track model folder changes
- Shuffle some globals
- Activate System Verbosity for GUI

* lib.gui.utils - Documentation and clean up
- lib.gui.custom_widgets - Create and document

* Add GUI config option to disable auto loading model stats 
lib/gui/display_analysis.py