From bfb1be2820417fb5d2e843d9e164862b8962446d Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 22 Mar 2023 16:09:48 -0300 Subject: [PATCH] Minor fix --- extensions/send_pictures/script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/send_pictures/script.py b/extensions/send_pictures/script.py index 196c7d53..556a88e5 100644 --- a/extensions/send_pictures/script.py +++ b/extensions/send_pictures/script.py @@ -26,7 +26,7 @@ def caption_image(raw_image): def generate_chat_picture(picture, name1, name2): text = f'*{name1} sends {name2} a picture that contains the following: "{caption_image(picture)}"*' # lower the resolution of sent images for the chat, otherwise the log size gets out of control quickly with all the base64 values in visible history - image.thumbnail((300, 300)) + picture.thumbnail((300, 300)) buffer = BytesIO() picture.save(buffer, format="JPEG") img_str = base64.b64encode(buffer.getvalue()).decode('utf-8') @@ -45,4 +45,4 @@ def ui(): picture_select.upload(eval(function_call), shared.input_params, shared.gradio['display'], show_progress=shared.args.no_stream) # Clear the picture from the upload field - picture_select.upload(lambda : None, [], [picture_select], show_progress=False) \ No newline at end of file + picture_select.upload(lambda : None, [], [picture_select], show_progress=False)