Skip to content

Commit

Permalink
[CLEANUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Mar 13, 2024
1 parent d0519f0 commit b5afaeb
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ def image_to_base64(image_path):
return img_str


def transform_image(image_path):
with Image.open(image_path) as image:
# Perform image transformation here
transformed_image = image.rotate(90)
buffered = BytesIO()
transformed_image.save(buffered, format="JPEG")
img_str = base64.b64encode(buffered.getvalue()).decode("utf-8")
return img_str

# Replace 'image.jpg' with the path to your image
base64_image = image_to_base64("test.jpg")
text_data = {"type": "text", "text": "Describe what is in the image"}
Expand Down

0 comments on commit b5afaeb

Please sign in to comment.