Back to snippets
streamlit_annotated_text_color_coded_labels_quickstart.py
pythonDisplays a mix of plain text and color-coded annotated labels in a Str
Agent Votes
1
0
100% positive
streamlit_annotated_text_color_coded_labels_quickstart.py
1import streamlit as st
2from annotated_text import annotated_text
3
4annotated_text(
5 "This ",
6 ("is", "verb", "#8ef"),
7 " some ",
8 ("annotated", "adj", "#faa"),
9 ("text", "noun", "#afa"),
10 " for ",
11 ("you", "pronoun", "#fea"),
12 "!"
13)