Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenBMB/MiniCPM-V
/ img2base64
Function
img2base64
chat.py:134–137 ·
view source on GitHub ↗
(file_name)
Source
from the content-addressed store, hash-verified
132
133
134
def
img2base64(file_name):
135
with
open(file_name,
'rb'
)
as
f:
136
encoded_string = base64.b64encode(f.read())
137
return
encoded_string
138
139
class
MiniCPMV:
140
def
__init__(self, model_path) -> None:
Callers
1
chat.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected