Spaces:
Sleeping
Sleeping
streamlit usage to app.py
Browse files
app.py
CHANGED
|
@@ -2,3 +2,34 @@ import streamlit as st
|
|
| 2 |
|
| 3 |
x = st.slider('Select a value')
|
| 4 |
st.write(x, 'squared is', x * x)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
x = st.slider('Select a value')
|
| 4 |
st.write(x, 'squared is', x * x)
|
| 5 |
+
|
| 6 |
+
# main.py์ ๋ค์ ์ฝ๋๋ฅผ ์
๋ ฅํ๊ณ ์ ์ฅํ์ญ์์ค.
|
| 7 |
+
%%writefile main.py
|
| 8 |
+
import streamlit as st
|
| 9 |
+
st.header("this is the markdown")
|
| 10 |
+
st.markdown("this is the header")
|
| 11 |
+
st.subheader("this is the subheader")
|
| 12 |
+
st.caption("this is the caption")
|
| 13 |
+
st.code("x=2021")
|
| 14 |
+
st.latex(r''' a+a r^1+a r^2+a r^3 ''')
|
| 15 |
+
st.write("์คํธ๋ฆผ๋ฆฟ์ ํ
์คํธ ์ค์
๋๋ค.")
|
| 16 |
+
|
| 17 |
+
st.checkbox('yes')
|
| 18 |
+
st.button('Click')
|
| 19 |
+
st.radio('Pick your gender',['Male','Female'])
|
| 20 |
+
st.selectbox('Pick your gender',['Male','Female'])
|
| 21 |
+
st.multiselect('choose a planet',['Jupiter', 'Mars', 'neptune'])
|
| 22 |
+
st.select_slider('Pick a mark', ['Bad', 'Good', 'Excellent'])
|
| 23 |
+
st.slider('Pick a number', 0,50)
|
| 24 |
+
|
| 25 |
+
st.number_input('Pick a number', 0,10)
|
| 26 |
+
st.text_input('Email address')
|
| 27 |
+
st.date_input('Travelling date')
|
| 28 |
+
st.time_input('School time')
|
| 29 |
+
st.text_area('Description')
|
| 30 |
+
st.file_uploader('Upload a photo')
|
| 31 |
+
st.color_picker('Choose your favorite color')
|
| 32 |
+
|
| 33 |
+
st.image("/content/Streamlit-logo-primary-colormark-darktext.png")
|
| 34 |
+
st.audio("/content/news.mp3")
|
| 35 |
+
st.video("/content/autoai.mp4")
|