Spaces:
Runtime error
Runtime error
Create new file
Browse files
app.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import streamlit as st
|
| 3 |
+
from streamlit_lottie import st_lottie
|
| 4 |
+
|
| 5 |
+
def load_lottie_url(url: str):
|
| 6 |
+
r = requests.get(url)
|
| 7 |
+
if r.status_code != 200:
|
| 8 |
+
return None
|
| 9 |
+
return r.json()
|
| 10 |
+
|
| 11 |
+
def ShowAnimation(name, URL):
|
| 12 |
+
anim=load_lottie_url(URL)
|
| 13 |
+
st_lottie(anim, key = name)
|
| 14 |
+
|
| 15 |
+
st.markdown('# Animations: https://lottiefiles.com/recent')
|
| 16 |
+
st.markdown("# Animate with JSON, SVG, Adobe XD, Figma, and deploy to web, mobile as tiny animation files ")
|
| 17 |
+
ShowAnimation("Badge1","https://assets5.lottiefiles.com/packages/lf20_wtohqzml.json")
|
| 18 |
+
ShowAnimation("Badge2","https://assets5.lottiefiles.com/packages/lf20_i4zw2ddg.json")
|
| 19 |
+
ShowAnimation("Badge3","https://assets5.lottiefiles.com/private_files/lf30_jfhmdmk5.json")
|
| 20 |
+
ShowAnimation("Graph","https://assets6.lottiefiles.com/packages/lf20_4gqhiayj.json")
|
| 21 |
+
ShowAnimation("PhoneBot","https://assets9.lottiefiles.com/packages/lf20_zrqthn6o.json")
|
| 22 |
+
ShowAnimation("SupportBot","https://assets5.lottiefiles.com/private_files/lf30_cmd8kh2q.json")
|
| 23 |
+
ShowAnimation("ChatBot","https://assets8.lottiefiles.com/packages/lf20_j1oeaifz.json")
|
| 24 |
+
ShowAnimation("IntelligentMachine","https://assets8.lottiefiles.com/packages/lf20_edouagsj.json")
|
| 25 |
+
ShowAnimation("GearAI","https://assets10.lottiefiles.com/packages/lf20_3jkp7dqt.json")
|
| 26 |
+
ShowAnimation("ContextGraph","https://assets10.lottiefiles.com/private_files/lf30_vwC61X.json")
|
| 27 |
+
ShowAnimation("Yggdrasil","https://assets4.lottiefiles.com/packages/lf20_8q1bhU.json")
|
| 28 |
+
ShowAnimation("Studying","https://assets9.lottiefiles.com/packages/lf20_6ft9bypa.json")
|
| 29 |
+
|