MCPcopy
hub / github.com/XPixelGroup/DiffBIR / load_image

Function load_image

llava/eval/run_llava.py:33–39  ·  view source on GitHub ↗
(image_file)

Source from the content-addressed store, hash-verified

31
32
33def load_image(image_file):
34 if image_file.startswith("http") or image_file.startswith("https"):
35 response = requests.get(image_file)
36 image = Image.open(BytesIO(response.content)).convert("RGB")
37 else:
38 image = Image.open(image_file).convert("RGB")
39 return image
40
41
42def load_images(image_files):

Callers 1

load_imagesFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected