summaryrefslogtreecommitdiffstats
path: root/g4f/gui/__init__.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-03-17 10:52:54 +0100
committerGitHub <noreply@github.com>2024-03-17 10:52:54 +0100
commit9536b857d67b2b9b819580eeb55c6a051454075f (patch)
tree6002f32229f616f16738c35d4b0a63d59b5ee378 /g4f/gui/__init__.py
parentUpdate GigaChat.py (diff)
parentFix abort in webview (diff)
downloadgpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.tar
gpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.tar.gz
gpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.tar.bz2
gpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.tar.lz
gpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.tar.xz
gpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.tar.zst
gpt4free-9536b857d67b2b9b819580eeb55c6a051454075f.zip
Diffstat (limited to 'g4f/gui/__init__.py')
-rw-r--r--g4f/gui/__init__.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/g4f/gui/__init__.py b/g4f/gui/__init__.py
index dff720ac..3f695200 100644
--- a/g4f/gui/__init__.py
+++ b/g4f/gui/__init__.py
@@ -1,12 +1,13 @@
from ..errors import MissingRequirementsError
-try:
- from .server.app import app
- from .server.website import Website
- from .server.backend import Backend_Api
-except ImportError:
- raise MissingRequirementsError('Install "flask" package for the gui')
def run_gui(host: str = '0.0.0.0', port: int = 8080, debug: bool = False) -> None:
+ try:
+ from .server.app import app
+ from .server.website import Website
+ from .server.backend import Backend_Api
+ except ImportError:
+ raise MissingRequirementsError('Install "flask" package for the gui')
+
if debug:
import g4f
g4f.debug.logging = True