  import sys
  import tkinter as tk
  from tkinter import ttk
  import webbrowser
  
  from subprocess import Popen, PIPE, STDOUT
  
  from lib.multithreading import MultiThread
 
</s> remove from lib.serializer import get_serializer
 </s> add from lib.serializer import get_serializer, Serializer </s> remove     def output_sysinfo(self):
        """ Output system information to console """
        logger.debug("Obtaining system information")
        self.root.config(cursor="watch")
        self.clear_console()
        try:
            from lib.sysinfo import sysinfo  # pylint:disable=import-outside-toplevel
            info = sysinfo
        except Exception as err:  # pylint:disable=broad-except
            info = f"Error obtaining system info: {str(err)}"
        self.clear_console()
        logger.debug("Obtained system information: %s", info)
        print(info)
        self.root.config(cursor="")

    def check(self):
        """ Check for updates and clone repository """
        logger.debug("Checking for updates...")
        self.root.config(cursor="watch")
        encoding = locale.getpreferredencoding()
        logger.debug("Encoding: %s", encoding)
        self.check_for_updates(encoding, check=True)
        self.root.config(cursor="")

    def update(self):
        """ Check for updates and clone repository """
        logger.debug("Updating Faceswap...")
        self.root.config(cursor="watch")
        encoding = locale.getpreferredencoding()
        logger.debug("Encoding: %s", encoding)
        success = False
        if self.check_for_updates(encoding):
            success = self.do_update(encoding)
        update_deps.main(is_gui=True)
        if success:
            logger.info("Please restart Faceswap to complete the update.")
        self.root.config(cursor="")

    @staticmethod
    def check_for_updates(encoding, check=False):
        """ Check whether an update is required """
        # Do the check
        logger.info("Checking for updates...")
        update = False
        msg = ""
        gitcmd = "git remote update && git status -uno"
        with Popen(gitcmd, shell=True, stdout=PIPE, stderr=STDOUT, cwd=_WORKING_DIR) as cmd:
            stdout, _ = cmd.communicate()
            retcode = cmd.poll()
        if retcode != 0:
            msg = ("Git is not installed or you are not running a cloned repo. "
                   "Unable to check for updates")
        else:
            chk = stdout.decode(encoding, errors="replace").splitlines()
            for line in chk:
                if line.lower().startswith("your branch is ahead"):
                    msg = "Your branch is ahead of the remote repo. Not updating"
                    break
                if line.lower().startswith("your branch is up to date"):
                    msg = "Faceswap is up to date."
                    break
                if line.lower().startswith("your branch is behind"):
                    msg = "There are updates available"
                    update = True
                    break
                if "have diverged" in line.lower():
                    msg = "Your branch has diverged from the remote repo. Not updating"
                    break
        if not update or check:
            logger.info(msg)
        logger.debug("Checked for update. Update required: %s", update)
        return update

    @staticmethod
    def do_update(encoding):
        """ Update Faceswap """
        logger.info("A new version is available. Updating...")
        gitcmd = "git pull"
        with Popen(gitcmd,
                   shell=True,
                   stdout=PIPE,
                   stderr=STDOUT,
                   bufsize=1,
                   cwd=_WORKING_DIR) as cmd:
            while True:
                output = cmd.stdout.readline().decode(encoding, errors="replace")
                if output == "" and cmd.poll() is not None:
                    break
                if output:
                    logger.debug("'%s' output: '%s'", gitcmd, output.strip())
                    print(output.strip())
            retcode = cmd.poll()
        logger.debug("'%s' returncode: %s", gitcmd, retcode)
        if retcode != 0:
            logger.info("An error occurred during update. return code: %s", retcode)
            retval = False
        else:
            retval = True
        return retval

 </s> add  </s> remove         self.add_command(label="Reload Project from Disk",
 </s> add         self.add_command(label=_("Reload Project from Disk"), </s> remove     """ GUI Main Menu Bar """
    def __init__(self, master=None):
 </s> add     """ GUI Main Menu Bar

    Parameters
    ----------
    master: :class:`tkinter.Tk`
        The root tkinter object
    """
    def __init__(self, master: "FaceswapGui") -> None:
import typing as T
  import sys
  import tkinter as tk
import typing as T
  from tkinter import ttk
  import webbrowser
  
  from subprocess import Popen, PIPE, STDOUT
  
  from lib.multithreading import MultiThread
keep add keep keep keep keep keep keep
 locales: Add GUI menu translations 
lib/gui/menu.py