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

Function load_image

llava/serve/cli.py:18–24  ·  view source on GitHub ↗
(image_file)

Source from the content-addressed store, hash-verified

16
17
18def load_image(image_file):
19 if image_file.startswith('http://') or image_file.startswith('https://'):
20 response = requests.get(image_file)
21 image = Image.open(BytesIO(response.content)).convert('RGB')
22 else:
23 image = Image.open(image_file).convert('RGB')
24 return image
25
26
27def main(args):

Callers 1

mainFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected