Python/Streamlit

Streamlit) μ›Ή νŽ˜μ΄μ§€μ— λ‹€μ–‘ν•œ ν…μŠ€νŠΈ ν‘œμ‹œν•˜κΈ°

567Rabbit 2024. 4. 26. 17:11
import streamlit as st

def main() :
    #ν…μŠ€νŠΈλ₯Ό ν‘œμ‹œν•˜λŠ” 방법
    st.title('μ›Ή λŒ€μ‹œλ³΄λ“œ')
    st.text('μ›Ή λŒ€μ‹œλ³΄λ“œ κ°œλ°œν•˜κΈ°')
    
    name = '홍길동'
    
    #ν”„λ¦°νŠΈ ν•¨μˆ˜λŠ” λ””λ²„κΉ…μš©μž…λ‹ˆλ‹€!!!
    print(f'제 이름은 {name}μž…λ‹ˆλ‹€' )
    
    st.text(f'제 이름은 {name}μž…λ‹ˆλ‹€')
    
    st.header('이 μ˜μ—­μ€ 헀더')
    
    st.subheader('μ„œλΈŒ 헀더')
    
    st.success('μž‘μ—…μ΄ μ„±κ³΅ν–ˆμ„ λ•Œ μ‚¬μš©ν•˜μž.')
    st.warning('κ²½κ³  문ꡬλ₯Ό 보여주고 싢을 λ•Œ μ‚¬μš©ν•˜μž')
    st.info('정보λ₯Ό 보여주고 싢을 λ•Œ μ‚¬μš©ν•˜μž')
    st.error('λ¬Έμ œκ°€ μžˆλ‹€λŠ” κ±Έ μ•Œλ¦΄ λ•Œ μ‚¬μš©ν•˜μž')

if __name__ == '__main__' :
    main()