summaryrefslogtreecommitdiffstats
path: root/g4f/gui/server
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-06 10:47:43 +0200
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-04-06 10:47:43 +0200
commit0de9ca20044ced84c12fbcf3b6de90ac193025e4 (patch)
tree68b4041d0f7f1ce93e5d4e06f3cf89a5651911fd /g4f/gui/server
parentUpdate client.md (diff)
downloadgpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.gz
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.bz2
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.lz
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.xz
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.tar.zst
gpt4free-0de9ca20044ced84c12fbcf3b6de90ac193025e4.zip
Diffstat (limited to '')
-rw-r--r--g4f/gui/server/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py
index 747d0c21..29566595 100644
--- a/g4f/gui/server/api.py
+++ b/g4f/gui/server/api.py
@@ -136,7 +136,7 @@ class Api():
camera.take_picture(filename=filename, on_complete=self.on_camera)
def on_image_selection(self, filename):
- filename = filename[0] if isinstance(filename, list) else filename
+ filename = filename[0] if isinstance(filename, list) and filename else filename
if filename is not None and os.path.exists(filename):
self.image = filename
else: