              https://github.com/deepfakes/faceswap-playground"
          )
          parser.set_defaults(func=self.process)
  
      def process(self, arguments):
          ''' Builds the GUI '''
          self.arguments = arguments
          self.root.title('faceswap.py')
          self.menu()
          notebook = ttk.Notebook(self.root)
          notebook.pack(fill=tk.BOTH, expand=True)
  
          # extract, train and convert are explicitly stated to ensure they are always displayed in the same order
 
</s> remove         notebook = ttk.Notebook(self.root)
 </s> add         notebook = ttk.Notebook(self.gui) </s> remove         # extract, train and convert are explicitly stated to ensure they are always displayed in the same order
 </s> add         # Commands explicitly stated to ensure consistent ordering </s> remove             title = command.title()
            page = ttk.Frame(notebook)
            
            self.add_left_frame(page, command)
            self.add_frame_seperator(page)
            opt_frame = self.add_right_frame(page)
            
            for option in self.opts[command]:
                self.build_tabs(option, opt_frame)
            
            notebook.add(page, text=title)

        self.root.mainloop()
 </s> add             commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab() </s> remove        
        self.parse_arguments(description, subparser, command)

    def bad_args(self, args):
        self.parser.print_help()
        exit(0)

    def extract_options(self, subparsers):
        ''' Extract the existing ArgParse Options '''
        options = {command: subparsers[command].argument_list + subparsers[command].optional_arguments for command in subparsers.keys()}
        for command in options.values():
            for option in command:
                option['control_title'] = self.set_control_title(option.get('opts',''))
                option['control_type'] = self.set_control_type(option)
        return options

    @staticmethod
    def set_control_title(opts):
        ''' Take the option switch and format it nicely '''
        ctl_title = opts[0]
        if len(opts) == 2:
            ctl_title = opts[1]
        ctl_title = ctl_title.replace('-',' ').replace('_',' ')
        ctl_title = ctl_title.title().strip()
        return ctl_title
 
    @staticmethod
    def set_control_type(option):
        ''' Set what control type we should use for an option based on existence of various variables '''
        if option.get('dest', '') == 'alignments_path':
            ctl_type = 'filechooser'
        elif option.get('action', '') == FullPaths:
            ctl_type = 'folderchooser'
        elif option.get('choices', '') != '':
            ctl_type = 'combobox'
        elif option.get('type', '') in (str, float, int):
            ctl_type = 'entrybox'
        elif option.get('action', '') == 'store_true':
            ctl_type = 'checkbox'
        return ctl_type

    def parse_arguments(self, description, subparser, command):
        parser = subparser.add_parser(
            command,
            help="This Launches a GUI for Faceswap.",
            description=description,
            epilog="Questions and feedback: \
            https://github.com/deepfakes/faceswap-playground"
        )
        parser.set_defaults(func=self.process)
 </s> add         self.task = FaceswapControl() </s> remove # Right Frame setup    
    def add_right_frame(self, page):
 </s> add         self.notebook.add(self.page, text=self.title)

    def add_frame_seperator(self):
        ''' Add a seperator between left and right frames '''
        sep = tk.Frame(self.page, width=2, bd=1, relief=tk.SUNKEN)
        sep.pack(fill=tk.Y, padx=5, side=tk.LEFT)

    def add_right_frame(self):
    def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py')
              https://github.com/deepfakes/faceswap-playground"
          )
          parser.set_defaults(func=self.process)
  
    def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py')
    def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py')
    def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py')
    def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py')
          self.menu()
          notebook = ttk.Notebook(self.root)
          notebook.pack(fill=tk.BOTH, expand=True)
  
          # extract, train and convert are explicitly stated to ensure they are always displayed in the same order
keep keep keep keep replace replace replace replace keep keep keep keep keep
 GUI v0.1.0a (#336)

* Code clean up

* Code refactor

* bugfix: Find paths to icons when launched from outside faceswap dir

* Bugfix: Disable GUI if TkInter app not available

* BugFix: Disable GUI if $DISPLAY not detected

* Minor code ammends

* Code Refactor

* DISPLAY check fix 
scripts/gui.py