XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix requirements in gui api

0ab7cf71
Heiner Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +6 -21
Modified g4f/gui/server/api.py +6 -6
@@ -13,8 +13,13 @@ try:
13 13 from plyer import camera
14 14 from plyer import filechooser
15 15 app_storage_path = platformdirs.user_pictures_dir
16 user_select_image = partial(
17 filechooser.open_file,
18 path=platformdirs.user_pictures_dir(),
19 filters=[["Image", "*.jpg", "*.jpeg", "*.png", "*.webp", "*.svg"]],
20 )
16 21 has_plyer = True
17 except ImportError:
22 except (ImportError, NameError):
18 23 has_plyer = False
19 24 try:
20 25 from android.runnable import run_on_ui_thread
@@ -26,11 +31,6 @@ try:
26 31 has_android = True
27 32 except ImportError:
28 33 run_on_ui_thread = lambda a : a
29 user_select_image = partial(
30 filechooser.open_file,
31 path=platformdirs.user_pictures_dir(),
32 filters=[["Image", "*.jpg", "*.jpeg", "*.png", "*.webp", "*.svg"]],
33 )
34 34 has_android = False
35 35
36 36 from g4f import version, models
Deleted main.py +0 -15
@@ -1,15 +0,0 @@
1 import ssl
2 import certifi
3 from functools import partial
4
5 ssl.default_ca_certs = certifi.where()
6 ssl.create_default_context = partial(
7 ssl.create_default_context,
8 cafile=certifi.where()
9 )
10
11 from g4f.gui.webview import run_webview
12 import g4f.debug
13 g4f.debug.version_check = False
14
15 run_webview(True);