MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / encode_image

Function encode_image

eval/grounding_eval/code/GPT-4o/fun2bbox_eval_click.py:37–41  ·  view source on GitHub ↗
(image_path)

Source from the content-addressed store, hash-verified

35
36# Function to encode the image
37def encode_image(image_path):
38 image = Image.open(image_path)
39 w, h = image.width, image.height
40 with open(image_path, "rb") as image_file:
41 return base64.b64encode(image_file.read()).decode("utf-8"),w, h
42
43async def call_Qwenvl(item, client, model_name):
44 """

Callers 1

call_QwenvlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected