in model-gallery/deploy/mllm/webui_client.py [0:0]
def encode_base64_content_from_file(file_path): with open(file_path, "rb") as file: encoded_string = base64.b64encode(file.read()).decode("utf-8") return encoded_string