Home ยป Education ยป Integrate Lottie Animations Inside Your Streamlit App!

Integrate Lottie Animations Inside Your Streamlit App!

Written By Coding Is Fun on Saturday, Aug 28, 2021 | 08:00 AM

 
๐Ÿ‘‰ Explore All My Excel Solutions: https://pythonandvba.com/solutions ๐——๐—˜๐—ฆ๐—–๐—ฅ๐—œ๐—ฃ๐—ง๐—œ๐—ข๐—ก โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€ Learn how to use Lottie Files in Streamlit! Animations make our web app more engaging and fun, and Lottie Files are the easiest way to do it! In this tutorial, I'll show you exactly how to do it. ๐ŸŒŽ ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ: โ–บ Lottie Files: https://lottiefiles.com/ โ–บ GitHub Lottie Files: https://github.com/andfanilo/streamlit-lottie ๐Ÿ“ ๐—ฆ๐—”๐— ๐—ฃ๐—Ÿ๐—˜ ๐—–๐—ข๐——๐—˜: โ–บ GistHub: https://gist.github.com/Sven-Bo/31d98f80b5fed1d3f53cf98e5b61e7c9 import json import requests # pip install requests import streamlit as st # pip install streamlit from streamlit_lottie import st_lottie # pip install streamlit-lottie # GitHub: https://github.com/andfanilo/streamlit-lottie # Lottie Files: https://lottiefiles.com/ def load_lottiefile(filepath: str): with open(filepath, "r") as f: return json.load(f) def load_lottieurl(url: str): r = requests.get(url) if r.status_code != 200: return None return r.json() lottie_coding = load_lottiefile("lottiefile.json") # replace link to local lottie file lottie_hello = load_lottieurl("https://assets9.lottiefiles.com/packages/lf20_M9p23l.json") st_lottie( lottie_hello, speed=1, reverse=False, loop=True, quality="low", # medium ; high renderer="svg", # canvas height=None, width=None, key=None, ) ๐—ง๐—ข๐—ข๐—Ÿ๐—ฆ ๐—”๐—ก๐—— ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€ ๐Ÿ†“ใ€๐—™๐—ฅ๐—˜๐—˜ใ€‘Excel Add-in (๐— ๐˜†๐—ง๐—ผ๐—ผ๐—น๐—•๐—ฒ๐—น๐˜): https://pythonandvba.com/mytoolbelt ๐Ÿ“Š Dashboard Excel Add-In (๐—š๐—ฟ๐—ฎ๐—ณ๐—น๐˜†): https://pythonandvba.com/grafly ๐ŸŽจ Cartoon Charts Excel Add-In (๐—–๐˜‚๐˜๐—ฒ๐—ฃ๐—น๐—ผ๐˜๐˜€): https://pythonandvba.com/cuteplots ๐Ÿคช Fun Emoji Excel Add-In (๐—˜๐—บ๐—ผ๐—ท๐—ถ๐—ณ๐˜†): https://pythonandvba.com/emojify ๐Ÿ“‘ Excel Templates: https://pythonandvba.com/go/excel-templates ๐ŸŽ“ My Courses: https://pythonandvba.com/go/courses ๐Ÿ“š Books, Tools, and More: https://pythonandvba.com/resources ๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง ๐—ช๐—œ๐—ง๐—› ๐— ๐—˜ โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€ ๐Ÿ”— LinkedIn: https://www.linkedin.com/in/sven-bosau/ ๐Ÿ“ธ Instagram: https://instagram.com/codingisfun_official ๐Ÿ’ป GitHub: https://github.com/Sven-Bo ๐Ÿ’ฌ Discord: https://pythonandvba.com/discord ๐Ÿ“ฌ Contact: https://pythonandvba.com/contact โ˜• ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ? If you want to support this channel, you can buy me a coffee here: https://pythonandvba.com/coffee-donation