Skip to content

Commit

Permalink
Merge pull request xtekky#1729 from hlohaus/giga
Browse files Browse the repository at this point in the history
Fix requirements in gui  api
  • Loading branch information
hlohaus authored Mar 19, 2024
2 parents 71d9074 + 0ab7cf7 commit cef44ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
12 changes: 6 additions & 6 deletions g4f/gui/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
from plyer import camera
from plyer import filechooser
app_storage_path = platformdirs.user_pictures_dir
user_select_image = partial(
filechooser.open_file,
path=platformdirs.user_pictures_dir(),
filters=[["Image", "*.jpg", "*.jpeg", "*.png", "*.webp", "*.svg"]],
)
has_plyer = True
except ImportError:
except (ImportError, NameError):
has_plyer = False
try:
from android.runnable import run_on_ui_thread
Expand All @@ -26,11 +31,6 @@
has_android = True
except ImportError:
run_on_ui_thread = lambda a : a
user_select_image = partial(
filechooser.open_file,
path=platformdirs.user_pictures_dir(),
filters=[["Image", "*.jpg", "*.jpeg", "*.png", "*.webp", "*.svg"]],
)
has_android = False

from g4f import version, models
Expand Down
15 changes: 0 additions & 15 deletions main.py

This file was deleted.

0 comments on commit cef44ed

Please sign in to comment.