You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
I'm trying to get the image_url to use eval_model, but I always have the same error and I don't know why. I don't know hot to use raw image from GitHub
I think the problem is in the image file because when in try this in another notebook it works
Command:
PASTE THE COMMANDS HERE.
import requests
from PIL import Image
from io import BytesIO
#la imagen URL (utilizar la fila imagen URL from Github)
image_url = 'https://github.com/haotian-liu/LLaVA/blob/main/images/llava_v1_5_radar.jpg'
#download the image and open it with PIL
response = requests.get(image_url)
image = Image.open(BytesIO(response.content))
import matplotlib.pyplot as plt
#display the image using matplotlib
plt.imshow(image)
plt.axis('off') #turn off axis nu,bers and ticks
plt.show()
#ahora pasar la imagen procesada al eval_model
eval_model(
tokenizer,
model,
image_processor,
context_len,
image,
"what do you see in this picture?"
)
Log:
UnidentifiedImageError Traceback (most recent call last)
[<ipython-input-20-9a1b8412d79e>](https://localhost:8080/#) in <cell line: 10>()
8 #download the image and open it with PIL
9 response = requests.get(image_url)
---> 10 image = Image.open(BytesIO(response.content))
11
12 import matplotlib.pyplot as plt
[/usr/local/lib/python3.10/dist-packages/PIL/Image.py](https://localhost:8080/#) in open(fp, mode, formats)
3281 fp.seek(0)
3282 except (AttributeError, io.UnsupportedOperation):
-> 3283 fp = io.BytesIO(fp.read())
3284 exclusive_fp = True
3285
UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7a68fc2f6f20>
PASTE THE LOGS HERE.
Screenshots:
The text was updated successfully, but these errors were encountered:
Describe the issue
Issue:
I'm trying to get the image_url to use eval_model, but I always have the same error and I don't know why. I don't know hot to use raw image from GitHub
I think the problem is in the image file because when in try this in another notebook it works
Command:
Screenshots:
The text was updated successfully, but these errors were encountered: