Minor changes

This commit is contained in:
oobabooga 2023-03-22 15:55:03 -03:00 committed by GitHub
parent 5389fce8e1
commit 104212529f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 21 deletions

View file

@ -2,12 +2,11 @@ import base64
from io import BytesIO
import gradio as gr
import torch
from transformers import BlipForConditionalGeneration, BlipProcessor
from PIL import Image
import modules.chat as chat
import modules.shared as shared
import torch
from PIL import Image
from transformers import BlipForConditionalGeneration, BlipProcessor
# If 'state' is True, will hijack the next chat generation with
# custom input text given by 'value' in the format [text, visible_text]
@ -54,4 +53,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)
picture_select.upload(lambda : None, [], [picture_select], show_progress=False)