          for trigger in ("mask_toggle", "update"):
              filename = self._gui_triggers[trigger]
              if os.path.isfile(filename):
                  logger.debug("GUI Trigger received for: '%s'", trigger)
  
                  logger.debug("Removing gui trigger file: %s", filename)
                  os.remove(filename)
                  if trigger == "update":
                      print("\n")  # Let log print on different line from loss output
                      logger.info("Refresh preview requested...")
 
</s> remove                 if trigger == "update":
                    print("\n")  # Let log print on different line from loss output
 </s> add                 if trigger == "refresh":
                    print("")  # Let log print on different line from loss output </s> remove         parent_flags = dict(mask_toggle="request_mask_toggle", update="request_refresh")
        for trigger in ("mask_toggle", "update"):
            filename = self._gui_triggers[trigger]
 </s> add         for trigger, filename in self._gui_triggers.items(): </s> remove                 getattr(self._preview, parent_flags[trigger])()
 </s> add         return retval </s> remove         Parameters
        ----------
        event:
            The key press received
        """
        key = event.key.lower()
        if key not in self._callbacks:
 </s> add     def shutdown(self) -> None:
        """ Send a signal to shutdown the preview window. """
        if not self._active: </s> remove             return
 </s> add             return retval
                retval[trigger] = True
          for trigger in ("mask_toggle", "update"):
              filename = self._gui_triggers[trigger]
              if os.path.isfile(filename):
                  logger.debug("GUI Trigger received for: '%s'", trigger)
                retval[trigger] = True
                  logger.debug("Removing gui trigger file: %s", filename)
                  os.remove(filename)
                  if trigger == "update":
                      print("\n")  # Let log print on different line from loss output
                      logger.info("Refresh preview requested...")
keep keep keep keep replace keep keep keep keep keep
 Training - Use custom preview pop-out 
scripts/train.py