          notebook.pack(fill=tk.BOTH, expand=True)
  
          # extract, train and convert are explicitly stated to ensure they are always displayed in the same order
          for command in ('extract', 'train', 'convert'):
              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()
  
  # All pages stuff
      def menu(self):
          ''' Menu bar for loading and saving configs '''
          menubar = tk.Menu(self.root)
 
</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         notebook = ttk.Notebook(self.root)
 </s> add         notebook = ttk.Notebook(self.gui) </s> remove         menubar = tk.Menu(self.root)
 </s> add         menubar = tk.Menu(self.gui) </s> remove     def process(self, arguments):
        ''' Builds the GUI '''
        self.arguments = arguments
        self.root.title('faceswap.py')
 </s> add     def build_gui(self):
        ''' Build the GUI '''
        self.gui.title('faceswap.py') </s> remove         optlist = ['faceswap.py', command]
        for item in self.opts[command]:
            opt_value = str(item.get('value','').get())
            opt = item['opts'][0]
            if opt_value == 'False' or opt_value == '':
                continue
            elif opt_value == 'True':
                optlist.append(opt)
            else:
                optlist.extend((opt, opt_value))
        sys.argv = optlist
        process = Thread(target=self.launch_thread, args=(command,))
        process.start()

    def launch_thread(self, command):
        ''' Launch the script inside a subprocess to keep the GUI active '''
        title = command.capitalize()
        self.statustext.set('Running - {}'.format(title))
        self.parser.set_defaults(func=self.bad_args)
        arguments = self.parser.parse_args()
        arguments.func(arguments)
        self.statustext.set('Idle')
 </s> add         for option in self.gui.opts[self.command]:
            self.build_tabs(option, opt_frame)
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
          notebook.pack(fill=tk.BOTH, expand=True)
  
          # extract, train and convert are explicitly stated to ensure they are always displayed in the same order
          for command in ('extract', 'train', 'convert'):
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
            commandtab = CommandTab(self, notebook, command)
            commandtab.build_tab()
  
  # All pages stuff
      def menu(self):
          ''' Menu bar for loading and saving configs '''
          menubar = tk.Menu(self.root)
keep keep keep keep replace replace replace replace replace replace replace replace replace 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