healthchat / modules /image_processing.py
Prince012's picture
multimodal ai chatbot
03d8f07
import base64
def encode_image_to_base64(image_path):
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode('utf-8')