st-annotated-text-4.0.2
توضیحات
A simple component to display annotated text in Streamlit apps.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | st-annotated-text-4.0.2 |
| نام | st-annotated-text |
| نسخه کتابخانه | 4.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Thiago Teixeira |
| ایمیل نویسنده | me@thiagot.com |
| آدرس صفحه اصلی | https://github.com/tvst/st-annotated-text |
| آدرس اینترنتی | https://pypi.org/project/st-annotated-text/ |
| مجوز | Apache 2 |
# Annotated Text Component for Streamlit
A simple component to display annotated text in Streamlit apps. For example:

Or, even better, check out our demo app here:
[](https://st-annotated-text.streamlit.app/)
## Installation
First install Streamlit (of course!) then pip-install this library:
```bash
pip install streamlit
pip install st-annotated-text
```
## Example
```python
import streamlit as st
from annotated_text import annotated_text
annotated_text(
"This ",
("is", "verb"),
" some ",
("annotated", "adj"),
("text", "noun"),
" for those of ",
("you", "pronoun"),
" who ",
("like", "verb"),
" this sort of ",
("thing", "noun"),
"."
)
```
For more examples, including :sparkles:**customization options**:sparkles:, see
[the demo app](https://st-annotated-text.streamlit.app).
## Parameters
The `annotated_text()` function accepts any number of the following arguments:
- strings, to draw the string as-is on the screen.
- tuples of the form (main_text, annotation_text, background, color) where
background and foreground colors are optional and should be an CSS-valid string such as
"#aabbcc" or "rgb(10, 20, 30)"
- [htbuilder.HtmlElement](https://github.com/tvst/htbuilder) objects in case you want to customize
the annotations further. In particular, you can import the `annotation()` function from this
module to easily produce annotations whose CSS you can customize via keyword arguments.
- lists of any of the above -- or of lists!
نیازمندی
| مقدار | نام |
|---|---|
| - | htbuilder |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.5 | Python |
نحوه نصب
نصب پکیج whl st-annotated-text-4.0.2:
pip install st-annotated-text-4.0.2.whl
نصب پکیج tar.gz st-annotated-text-4.0.2:
pip install st-annotated-text-4.0.2.tar.gz