Spaces:
Runtime error
Runtime error
File size: 1,618 Bytes
fc8ccfd effa5a6 36a81a7 851ef2b fc8ccfd 4ce68f7 75bbe6e 50b6772 fc8ccfd def8a9a f291aea 13a55c9 dea6e9c cf4616e dea6e9c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
import streamlit as st
import base64
import requests
from streamlit_lottie import st_lottie
add_selectbox = st.sidebar.selectbox(
"How would you like to be contacted?",
("Email", "Home phone", "Mobile phone"))
st.write('Please enter your', add_selectbox,':')
contact_info = st.text_input('', '')
st.write('The Preferred form of contact is', contact_info)
with st.sidebar:
add_radio = st.radio(
"What day are you available",
("Monday", "Tuesday","Wednesday","Thursday", "Friday","Saturday","Sunday"))
def add_bg_from_url():
st.markdown(
f"""
<style>
.stApp {{
background-image: url("https://cdn.pixabay.com/photo/2019/04/24/11/27/flowers-4151900_960_720.jpg");
background-attachment: fixed;
background-size: cover
}}
</style>
""",
unsafe_allow_html=True
)
add_bg_from_url()
import time
import requests
import streamlit as st
from streamlit_lottie import st_lottie
from streamlit_lottie import st_lottie_spinner
def load_lottieurl(url: str):
r = requests.get(url)
if r.status_code != 200:
return None
return r.json()
lottie_url_hello = "https://assets5.lottiefiles.com/packages/lf20_V9t630.json"
lottie_url_download = "https://assets4.lottiefiles.com/private_files/lf30_t26law.json"
lottie_hello = load_lottieurl(lottie_url_hello)
lottie_download = load_lottieurl(lottie_url_download)
st_lottie(lottie_hello, key="hello")
if st.button("Download"):
with st_lottie_spinner(lottie_download, key="download"):
time.sleep(5)
st.balloons() |