File size: 493 Bytes
ae4f900
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import streamlit as st

# 标题
st.title("欢迎使用Streamlit应用程序")

# 文本输入框
name = st.text_input("请输入您的姓名")

# 按钮
button_clicked = st.button("点击这里")

# 根据按钮点击状态展示消息
if button_clicked:
    st.write(f"你好,{name}!欢迎使用Streamlit应用程序。")

# 图片
st.image("https://www.streamlit.io/images/brand/streamlit-logo-primary-colormark-darktext.png", 
         caption="Streamlit Logo", use_column_width=True)