Allow to use PIL Image in chat function

#34
by akshayballal - opened

In many cases one might have a PIL image instead of an images saved on disk. This change allows to use the chat function with PIL images.

In that case, one should call the chat method with gradio_input=True which will do what you are trying to do. No need for any code changes.

model.chat(tokenizer, gradio_input=True, image_file=image, ocr_type='ocr')
Ready to merge
This branch is ready to get merged automatically.
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment