colpali-milvus / utils.py
saumitras's picture
added gemini and openai rag
a149cce unverified
raw
history blame contribute delete
159 Bytes
import base64
def encode_image(image_path):
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode('utf-8')