streamlit

Форк
0
/
st_caption.py 
61 строка · 1.4 Кб
1
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2024)
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
#     http://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14

15
import streamlit as st
16

17
sidebar_markdown = """# I am a header
18

19
## I am a subheader
20

21
### I am a subsubheader
22

23
I am some body text
24

25
[I am a link](https://google.com)
26

27
Foo `bar` baz"""
28

29
with st.sidebar:
30
    st.caption(sidebar_markdown)
31

32
st.caption("This is a caption!")
33
st.caption("This is a *caption* that contains **markdown inside it**!")
34
st.caption("This is a caption that contains <div>html</div> inside it!")
35
st.caption(
36
    "This is a caption that contains <div>html</div> inside it!", unsafe_allow_html=True
37
)
38
st.caption(
39
    """This is a caption that contains a bunch of interesting markdown:
40

41
# heading 1
42

43
## heading 2
44

45
### heading 3
46

47
#### heading 4
48

49
##### heading 5
50

51
###### heading 6
52

53
 * unordered list item 1
54
 * unordered list item 2
55
 * unordered list item 3
56

57
 1. ordered list item 1
58
 1. ordered list item 2
59
 1. ordered list item 3
60
"""
61
)
62

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.