summaryrefslogtreecommitdiffstats
path: root/g4f/gui/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/gui/__init__.py8
1 files changed, 4 insertions, 4 deletions
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']}")