精易论坛

标题: streamlit 不会前端的可以尝试,配合fastapi或其他后端使用 [打印本页]

作者: realpc    时间: 2023-12-24 16:12
标题: streamlit 不会前端的可以尝试,配合fastapi或其他后端使用

[Python] 纯文本查看 复制代码
import streamlit as st
import datetime


beijing_temperature={25,26,27,28}

st.header("天气预告")
#st.write("当前时间:", datetime.datetime.now())
st.write("天气:", "晴")
st.write("温度:", "28")
st.write("风速:", "5")
st.write("湿度:", "45%")

col1, col2, col3 = st.columns(3)
col1.metric("温度", "28", "1.2°F")
col2.metric("风速", "5", "9 mph")
col3.metric("湿度", "45%", "86%")
x = st.slider("aaappp")
st.write(x, "squared is", x * x)


streamlit run main.py 启动自动弹出网页

作者: qsgfsjagdwa    时间: 2024-10-31 19:08
这个绘制舒服




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4