AI_Test / app.py
jua76's picture
Update app.py
45269bd
Raw History Blame Contribute Delete
1.27 kB
import streamlit as st
import os
st.title("μ•ˆλ…•~ 1111111streamlit 개발 해보기 ")
txt=''
for i in os.listdir(os.getcwd()) :
txt +=i
st.markdown(txt)
st.code("""
XXXXXXX
""")
st.caption("caption κΈ°λŠ₯은 μΈμš©κ΅¬λ‚˜, 각주등을 넣을 λ•Œ μ‚¬μš©ν•˜κΈ° μ’‹μŠ΅λ‹ˆλ‹€.")
name = st.text_input("text_input의 κΈ°λŠ₯을 μ‚¬μš©ν•˜μ—¬, μ‚¬λžŒμ˜ 이름, μ—°λ½μ²˜ λ“± 각쒅 μ‚¬μš©μž μž…λ ₯을 λ°›μ•„λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.",placeholder="홍길동")
if st.button('μž…λ ₯'):
with open(os.getcwd() + '/new_file.txt', 'a') as f:
f.write(f'{name}λ‹˜, ν™˜μ˜ν•©λ‹ˆλ‹€.')
st.write(f'{name}λ‹˜, ν™˜μ˜ν•©λ‹ˆλ‹€.')
# input widget μ‹€μŠ΅
uploaded_file = st.file_uploader("Choose a csv file")
if uploaded_file:
st.write("파일 이름: ",uploaded_file.name)
# μ„ νƒλ°•μŠ€ widget
option = st.selectbox(
'How would you like to be contacted?',
('Email', 'Home phone', 'Mobile phone'))
st.write('You selected:', option)
with st.sidebar:
add_selectbox = st.selectbox(
"How would you like to be contacted? ",
("Email", "Home phone", "Mobile phone")
)
add_radio = st.radio(
"Choose a shipping method",
("Standard (5-15 days)", "Express (2-5 days)")
)
st.write(add_radio)