From b35dfcd1b01c575b65e0299ef71d285dc8f41459 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sun, 7 Apr 2024 10:36:13 +0200 Subject: Add local models to gui, Fix You Provider, add AsyncClient --- g4f/gui/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'g4f/gui/__init__.py') diff --git a/g4f/gui/__init__.py b/g4f/gui/__init__.py index 16b03e4c..f5e448ad 100644 --- a/g4f/gui/__init__.py +++ b/g4f/gui/__init__.py @@ -10,7 +10,7 @@ except ImportError as e: def run_gui(host: str = '0.0.0.0', port: int = 8080, debug: bool = False) -> None: if import_error is not None: - raise MissingRequirementsError(f'Install "gui" requirements | pip install g4f[gui] -U\n{import_error}') + raise MissingRequirementsError(f'Install "gui" requirements | pip install -U g4f[gui]\n{import_error}') if debug: from g4f import debug @@ -20,7 +20,7 @@ def run_gui(host: str = '0.0.0.0', port: int = 8080, debug: bool = False) -> Non 'port' : port, 'debug': debug } - + site = Website(app) for route in site.routes: app.add_url_rule( @@ -28,7 +28,7 @@ def run_gui(host: str = '0.0.0.0', port: int = 8080, debug: bool = False) -> Non view_func = site.routes[route]['function'], methods = site.routes[route]['methods'], ) - + backend_api = Backend_Api(app) for route in backend_api.routes: app.add_url_rule( @@ -36,7 +36,7 @@ def run_gui(host: str = '0.0.0.0', port: int = 8080, debug: bool = False) -> Non view_func = backend_api.routes[route]['function'], methods = backend_api.routes[route]['methods'], ) - + print(f"Running on port {config['port']}") app.run(**config) print(f"Closing port {config['port']}") -- cgit v1.2.3