From 331826b003fae451c70e17807d1a105af1453413 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sun, 11 Feb 2024 06:59:53 +0100 Subject: Add upload image in You provider --- g4f/gui/client/html/index.html | 3 ++- g4f/gui/server/backend.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'g4f/gui') diff --git a/g4f/gui/client/html/index.html b/g4f/gui/client/html/index.html index 175b7dc8..d91e9b77 100644 --- a/g4f/gui/client/html/index.html +++ b/g4f/gui/client/html/index.html @@ -114,7 +114,7 @@
-
diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py index 14f6cece..6847be34 100644 --- a/g4f/gui/server/backend.py +++ b/g4f/gui/server/backend.py @@ -138,6 +138,7 @@ class Backend_Api: file = request.files['image'] if file.filename != '' and is_allowed_extension(file.filename): kwargs['image'] = to_image(file.stream, file.filename.endswith('.svg')) + kwargs['image_name'] = file.filename if "json" in request.form: json_data = json.loads(request.form['json']) else: -- cgit v1.2.3