Spaces:
Running
Running
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() |