run.py 469 B

12345678910111213141516171819
  1. from .gui_parser import gui_parser
  2. from ..cookies import read_cookie_files
  3. import g4f.debug
  4. def run_gui_args(args):
  5. if args.debug:
  6. g4f.debug.logging = True
  7. if not args.ignore_cookie_files:
  8. read_cookie_files()
  9. from g4f.gui import run_gui
  10. host = args.host
  11. port = args.port
  12. debug = args.debug
  13. run_gui(host, port, debug)
  14. if __name__ == "__main__":
  15. parser = gui_parser()
  16. args = parser.parse_args()
  17. run_gui_args(args)