Spaces:
Sleeping
Sleeping
File size: 283 Bytes
93f30c6 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import base64
import requests
def load_image(image_path):
with open(image_path, "rb") as img_file:
return base64.b64encode(img_file.read()).decode()
def load_lottie_url(url):
r = requests.get(url)
if r.status_code != 200:
return None
return r.json() |