Skip to main content

streamlit-text-label

Custom streamlit component for labelling text selections, based on Label Studio. Demo

Usage

Prerequisite:

  • python >= 3.7
from streamlit_text_label import label_select

selections = label_select(body="lorem ipsum", labels=["Noun", "Verb"])

More details in example directory.

Develop

docker-compose up --build

Or manually, start the frontend

cd streamlit_text_label/frontend
npm install
npm run start

Followed by the example app

pip install -r example/requirements.txt
RELEASE=DEV streamlit run example/app.py

Publish

cd component/frontend
npm run build
cd ../..
python setup.py sdist bdist_wheel

Known Issues

  • Labelling standalone whitespaces will not work.
  • Trailing and leading whitespace will be included in selection but not rendered.
  • Label colors are generated from the first 6 characters of its own MD5 hash, which may clash and have low contrast (native HSL doesn't work fully with LS).
  • Each selection renders best with 1 label only. If you need multiple labels, create multiple selections.

Metadata

Release files for streamlit-text-label 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-text-label 0.1.2
File Size Uploaded Provenance Actions
streamlit_text_label-0.1.2.tar.gz 2.5 MB Without provenance Details for streamlit_text_label-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-text-label 0.1.2
File Interpreter ABI Platform Actions
streamlit_text_label-0.1.2-py3-none-any.whl Python 3 none any Details for streamlit_text_label-0.1.2-py3-none-any.whl

Total release size: 5.0 MB

Release files / streamlit_text_label-0.1.2.tar.gz

Download URL streamlit_text_label-0.1.2.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
ea6aaeeb7b941d42e7af8316f4225fb73514f7e5cce286e0869405bbe2795686
BLAKE2b-256 checksum
How to use checksums
c9ffa05906845d2513b4fc7fe5776c2089265b23c7309ead8c7d1c9c655b49d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / streamlit_text_label-0.1.2-py3-none-any.whl

Download URL streamlit_text_label-0.1.2-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6b06e09998faf2248b32d3ea2d0539f18acaf8a6d13e39296d704f680e50297e
BLAKE2b-256 checksum
How to use checksums
25577bd97eeb217c44a346561fd02c1fc697ddd92694fff8c886adc5a3cac046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for streamlit-text-label 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page