mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2026-01-08 05:10:11 +00:00
decode("utf-8") image
This commit is contained in:
parent
0de448369d
commit
19d835e321
@ -40,7 +40,7 @@ class OCRAgentGPT4O(OCRAgent):
|
||||
def get_text_from_image(self, image: PILImage.Image, ocr_languages: str = "eng") -> str:
|
||||
with BytesIO() as buffer:
|
||||
image.save(buffer, format="PNG")
|
||||
encoded_image = base64.b64encode(buffer.getvalue())
|
||||
encoded_image = base64.b64encode(buffer.getvalue()).decode("utf-8")
|
||||
|
||||
image.info
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user