主题
配置根目录
shell
~/.streamlit
├── config.toml
└── credentials.toml
config.toml
更多介绍:https://docs.streamlit.io/develop/api-reference/configuration/config.toml
设置主题
以下仅是示例
shell
[theme]
primaryColor = "#F63366"
backgroundColor = "black"
设置密码
shell
[secrets]
# List of locations where secrets are searched. An entry can be a path to a
# TOML file or directory path where Kubernetes style secrets are saved.
# Order is important, import is first to last, so secrets in later files
# will take precedence over earlier ones.
# Default: [ <path to local environment's secrets.toml file>, <path to project's secrets.toml file>,]
files = [ "~/.streamlit/secrets.toml", "~/project directory/.streamlit/secrets.toml",]
比如
shell
[secrets]
# List of locations where secrets are searched. An entry can be a path to a
# TOML file or directory path where Kubernetes style secrets are saved.
# Order is important, import is first to last, so secrets in later files
# will take precedence over earlier ones.
# Default: [ <path to local environment's secrets.toml file>, <path to project's secrets.toml file>,]
files = [ "~/.streamlit/secrets.toml"]
指定端口
shell
[server]
port = 8888
export STREAMLIT_SERVER_PORT=8888 streamlit run app.py