2024-04-06 14:27:28 +00:00
|
|
|
from .gui_parser import gui_parser
|
2024-04-21 20:39:00 +00:00
|
|
|
from ..cookies import read_cookie_files
|
|
|
|
import g4f.debug
|
2023-10-12 01:35:11 +00:00
|
|
|
|
|
|
|
def run_gui_args(args):
|
2024-04-21 20:39:00 +00:00
|
|
|
if args.debug:
|
|
|
|
g4f.debug.logging = True
|
|
|
|
if not args.ignore_cookie_files:
|
|
|
|
read_cookie_files()
|
2024-01-26 06:54:13 +00:00
|
|
|
from g4f.gui import run_gui
|
2023-10-09 22:46:14 +00:00
|
|
|
host = args.host
|
2023-10-12 01:35:11 +00:00
|
|
|
port = args.port
|
2023-10-09 22:46:14 +00:00
|
|
|
debug = args.debug
|
2023-10-12 01:35:11 +00:00
|
|
|
run_gui(host, port, debug)
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
parser = gui_parser()
|
|
|
|
args = parser.parse_args()
|
2024-01-26 06:54:13 +00:00
|
|
|
run_gui_args(args)
|