LLaVA-VL / LLaVA-Plus-Codebase

LLaVA-Plus: Large Language and Vision Assistants that Plug and Learn to Use Skills
https://llava-vl.github.io/llava-plus/
Apache License 2.0
698 stars 53 forks source link

Fix NameError in conversation.py #17

Closed h0jicha closed 10 months ago

h0jicha commented 10 months ago

When I started up a gradio web server and sent an image and text, I encountered the following error.

2023-12-04 02:00:42 | ERROR | stderr |   File "/~~/LLaVA-Plus/llava/conversation.py", line 453, in remove_pil
2023-12-04 02:00:42 | ERROR | stderr |     if isinstance(x, Image.Image):
2023-12-04 02:00:42 | ERROR | stderr | NameError: name 'Image' is not defined

I added a line from PIL import Image in llava/conversation.py to resolve it.

This will probably also resolve issue #12.