Skip to content

Commit

Permalink
make compatible with py <3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Feb 18, 2024
1 parent c726cbb commit 82fd686
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmm_tools/lmm/lmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Optional, Union


def encode_image(image: str | Path) -> str:
def encode_image(image: Union[str, Path]) -> str:
with open(image, "rb") as f:
encoded_image = base64.b64encode(f.read()).decode("utf-8")
return encoded_image
Expand Down

0 comments on commit 82fd686

Please sign in to comment.