File size: 792 Bytes
e891f47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3369999
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project      : Python.
# @File         : 8000_文本标识
# @Time         : 2022/10/17 下午1:39
# @Author       : yuanjie
# @WeChat       : meutils
# @Software     : PyCharm
# @Description  : 


import streamlit as st
from annotated_text import annotated_text, annotation

annotated_text(
    "我 ",
    ("热爱", "", "#8ef"),
    " 我们 ",
    ("非常棒", "", "#faa"),
    ("而", "", "#afa"),
    " 有用的 ",
    ("Streamlit", "", "#fea"),
    ("社区", "", "#8ef"),
    ("!", "", "#afa"),
)

annotated_text(
    "I ",
    ("Love", "", "#8ef"),
    " our ",
    ("Great", "", "#faa"),
    ("and", "", "#afa"),
    " Useful ",
    ("Streamlit", "", "#fea"),
    ("Community", "", "#8ef"),
    ("!", "", "#afa"),
)

"#8ef", "#faa"