(image_path)
| 35 | |
| 36 | # Function to encode the image |
| 37 | def 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 | |
| 43 | async def call_Qwenvl(item, client, model_name): |
| 44 | """ |