|
|
@ -108,7 +108,7 @@ class GPT4VisionAPI:
|
|
|
|
if not os.path.exists(img):
|
|
|
|
if not os.path.exists(img):
|
|
|
|
print(f"Image file not found: {img}")
|
|
|
|
print(f"Image file not found: {img}")
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
with open(img, "rb") as image_file:
|
|
|
|
with open(img, "rb") as image_file:
|
|
|
|
return base64.b64encode(image_file.read()).decode("utf-8")
|
|
|
|
return base64.b64encode(image_file.read()).decode("utf-8")
|
|
|
|
|
|
|
|
|
|
|
|