Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Hardware
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
dubbingAI
/
DubAI
like
5
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
DubAI
/
src
/
utils.py
pokung
Upload 27 files
1ccb8ec
verified
about 1 year ago
Raw
Download with hf CLI
Copy download link
History
Blame
Contribute
Delete
Safe
189 Bytes
import
base64
def
get_base64_image
(
img_path
):
with
open
(img_path,
"rb"
)
as
f:
encoded = base64.b64encode(f.read()).decode(
"utf-8"
)
return
f"data:image/png;base64,
{encoded}
"