<s>[INST] from PIL import Image
import numpy as np

# Open image file
img = Image.open("image.jpg")
# Convert to numpy array
img_array = np.array(img)

# print the shape of the image
print(img_array.shape)

# Display the image
img.show()

When I run this code, the image is displayed. However, when I then try to display the image, it is no longer displayed. I believe this is because the PIL function shows the image and then closes it after it is displayed?[/INST]