paulwong

          My Links

          Blog Stats

          常用鏈接

          留言簿(67)

          隨筆分類(1392)

          隨筆檔案(1150)

          文章分類(7)

          文章檔案(10)

          相冊

          收藏夾(2)

          AI

          Develop

          E-BOOK

          Other

          養生

          微服務

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          60天內閱讀排行

          python界面庫

          python服務器腳本,生成html,無需寫js,css,適合AI項目
          https://cheat-sheet.streamlit.app

          生成文字的代碼:
          st.text('Fixed width text')
          st.markdown('_Markdown_'# see #*
          st.caption('Balloons. Hundreds of them')
          st.latex(r''' e^{i\pi} + 1 = 0 ''')
          st.write('Most objects'# df, err, func, keras!
          st.write(['st''is <', 3]) # see *
          st.title('My title')
          st.header('My header')
          st.subheader('My sub')
          st.code('for i in range(8): foo()')

          # * optional kwarg unsafe_allow_html = True

          生成form控件:
          st.button('Hit me')
          st.data_editor('Edit data', data)
          st.checkbox('Check me out')
          st.radio('Pick one:', ['nose','ear'])
          st.selectbox('Select', [1,2,3])
          st.multiselect('Multiselect', [1,2,3])
          st.slider('Slide me', min_value=0, max_value=10)
          st.select_slider('Slide to select', options=[1,'2'])
          st.text_input('Enter some text')
          st.number_input('Enter a number')
          st.text_area('Area for textual entry')
          st.date_input('Date input')
          st.time_input('Time entry')
          st.file_uploader('File uploader')
          st.download_button('On the dl', data)
          st.camera_input("一二三,茄子!")
          st.color_picker('Pick a color')

          用表格顯示數據:
          st.dataframe(my_dataframe)
          st.table(data.iloc[0:10])
          st.json({'foo':'bar','fu':'ba'})
          st.metric(label="Temp", value="273 K", delta="1.2 K")


          顯示加載進度條與狀態:
          # Show a spinner during a process
          >>> with st.spinner(text='In progress'):
          >>>   time.sleep(3)
          >>>   st.success('Done')

          # Show and update progress bar
          >>> bar = st.progress(50)
          >>> time.sleep(3)
          >>> bar.progress(100)

          st.balloons()
          st.snow()
          st.toast('Mr Stay-Puft')
          st.error('Error message')
          st.warning('Warning message')
          st.info('Info message')
          st.success('Success message')
          st.exception(e)


          posted on 2024-08-12 15:19 paulwong 閱讀(92) 評論(0)  編輯  收藏 所屬分類: AI-PYTHON


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 通渭县| 杨浦区| 收藏| 卓尼县| 西平县| 乳源| 鸡东县| 德保县| 永福县| 申扎县| 开鲁县| 稷山县| 蛟河市| 山东| 大埔区| 喀什市| 丹江口市| 惠东县| 安庆市| 抚顺县| 酉阳| 湟中县| 老河口市| 仁怀市| 磐石市| 雷波县| 庐江县| 崇文区| 莒南县| 尖扎县| 海安县| 南丹县| 满城县| 十堰市| 册亨县| 宝坻区| 黔南| 阿拉尔市| 齐齐哈尔市| 德州市| 昆明市|