Alwrity - Bug fixes

This commit is contained in:
AjaySi
2024-04-12 17:36:37 +05:30
parent cf6516eeee
commit e3c3c03729
18 changed files with 81 additions and 81 deletions

View File

@@ -22,7 +22,7 @@ def analyze_and_extract_details_from_image(image_path, api_key):
"""
def encode_image(path):
""" Encodes an image to a base64 string. """
with open(path, "rb") as image_file:
with open(path, "rb", encoding="utf-8") as image_file:
return base64.b64encode(image_file.read()).decode('utf-8')
base64_image = encode_image(image_path)