Skip to main content

Streamlit component that allows you to display and edit annotated text

Project description

Installation instructions

pip install streamlit-annotation-editor

Usage instructions

import streamlit as st
from annotation_editor import (
    annotation_editor,
    AnnotationData,
    Annotation, 
    EntityType
)

annotation_data = [
     AnnotationData(
           text="A line of text containing several words.",
           annotations=[
                Annotation(start=0, end=1, entity_type="SINGLE_LETTER", confidence_score=0.99, text="A"),
                ...
           ]
     ),
     ...
]

entity_types = [
    EntityType(name="PERSON", primary_color="#e5381d", secondary_color="#c12b14"),
    ...
]

edited_annotation_data = annotation_editor(annotation_data, entity_types)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-annotation-editor-0.1.4.tar.gz (420.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_annotation_editor-0.1.4-py3-none-any.whl (425.5 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-annotation-editor-0.1.4.tar.gz.

File metadata

File hashes

Hashes for streamlit-annotation-editor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1d9201f9e8363144eee7c5fd6fe36ad736a5cbb6a3bc823169a37d4f8e5bebaa
MD5 be5747a1c27efa742b68f02bb9820ff9
BLAKE2b-256 3bd230058004de3e2489b747610e42240382b1fa9dc483f08a632948f266c679

See more details on using hashes here.

File details

Details for the file streamlit_annotation_editor-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_annotation_editor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 34c582424ae00e3730b54e07c5ba3fc50031661dd136781b070df24817480368
MD5 e9d0bad109772756ec0f57e66e8130b6
BLAKE2b-256 cc3ea72dc0268fecbe14b61166137e606839f89f9997abd89c8c5097ba3ab304

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page