Is there a way to change the 'running man' animation?

I would like to use a custom GIF or MP4 File. I’ve seen options like “streamlit-lottie” but that requires an upload of my animation to their server, which I don’t want.

Hi,

You can use st_lottie from your personal folders, just download the gif.

from streamlit_lottie import st_lottie
import requests 
import json

def cargarIcons(filepath):
    try:
        with open(filepath, 'r', encoding='utf-8') as file:
            return json.load(file)
    except FileNotFoundError:
        st.write(f"Archivo {filepath} no encontrado.")
        return None
    except json.JSONDecodeError:
        st.write(f"Error al decodificar el archivo JSON: {filepath}.")
        return None
    
...continue your code...

    try:
        icons = cargarIcons('G:/ADMINISTRACION/EVENTOS/05.-Apps/Warehouse/images/animation_lm98qhqz.json')
        st_lottie(icons,height=300,key='0')
    except Exception as e:        
        st.write(f"Error: {e}")

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.