diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-03-22 13:01:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 13:01:48 +0100 |
commit | cb74a39d9272801e5d264574fc16fce8ac89011d (patch) | |
tree | 81c2e2a16703797153f398953f757ef531c283ff /g4f/gui/server | |
parent | Merge pull request #1729 from hlohaus/giga (diff) | |
parent | Add updated requirements (diff) | |
download | gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.tar gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.tar.gz gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.tar.bz2 gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.tar.lz gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.tar.xz gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.tar.zst gpt4free-cb74a39d9272801e5d264574fc16fce8ac89011d.zip |
Diffstat (limited to 'g4f/gui/server')
-rw-r--r-- | g4f/gui/server/api.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py index 3adb88f4..e7683812 100644 --- a/g4f/gui/server/api.py +++ b/g4f/gui/server/api.py @@ -19,12 +19,12 @@ try: filters=[["Image", "*.jpg", "*.jpeg", "*.png", "*.webp", "*.svg"]], ) has_plyer = True -except (ImportError, NameError): +except ImportError: has_plyer = False try: from android.runnable import run_on_ui_thread - from android.storage import app_storage_path - from android.permissions import request_permissions, Permission + import android.permissions + from android.permissions import Permission from android.permissions import _RequestPermissionsManager _RequestPermissionsManager.register_callback() from .android_gallery import user_select_image @@ -161,7 +161,7 @@ class Api(): def request_permissions(self): if has_android: - request_permissions([ + android.permissions.request_permissions([ Permission.CAMERA, Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE |