diff --git a/extensions/send_pictures/script.py b/extensions/send_pictures/script.py index fe4f083d..7ee604ee 100644 --- a/extensions/send_pictures/script.py +++ b/extensions/send_pictures/script.py @@ -10,11 +10,10 @@ from modules.bot_picture import caption_image params = { } -# If 'state' is 'temporary' or 'permanent', will hijack the next -# chatbot wrapper call with a custom input text and optionally -# custom output text +# If 'state' is True, will hijack the next chat generation with +# custom input text input_hijack = { - 'state': 'off', + 'state': False, 'value': ["", ""] } @@ -57,4 +56,3 @@ def ui(): picture_select.upload(lambda picture, name1, name2: input_hijack.update({"state": True, "value": generate_chat_picture(picture, name1, name2)}), [picture_select, shared.gradio['name1'], shared.gradio['name2']], None) picture_select.upload(eval(function_call), shared.input_params, shared.gradio['display'], show_progress=shared.args.no_stream) picture_select.upload(lambda : None, [], [picture_select], show_progress=False) - #parser.add_argument('--picture', action='store_true', help='Adds an ability to send pictures in chat UI modes. Captions are generated by BLIP.')