Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
|
| 12 |
+
lottie_animation_1="https://assets5.lottiefiles.com/private_files/lf30_uetcyfgk.json"
|
| 13 |
+
lottie_animation_json=load_lottie_url(lottie_animation_1)
|
| 14 |
+
|
| 15 |
+
st.title("Streamlit Application using Lottie")
|
| 16 |
+
st.markdown("Lotties are better than GIFs")
|
| 17 |
+
|
| 18 |
+
st_lottie(lottie_animation_json, key="hello")
|
| 19 |
+
|