Clean up send_pictures extension

This commit is contained in:
oobabooga 2023-02-25 02:13:24 -03:00
parent 01acb250c5
commit ad83b1b828

View File

@ -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.')