Skip to main content

Streamlit component that allows you to display and edit annotated text

Project description

streamlit-annotation-editor

This Streamlit component allows you to display and edit annotated text.

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.2.tar.gz (412.5 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.2-py3-none-any.whl (800.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for streamlit-annotation-editor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 edaf0982998684e8c763d570dace2bb2de0ebca320d5d932f1092dd488afd5ee
MD5 f38df04a2298ef21bebd0182d95e6e41
BLAKE2b-256 747fd138327ed6357f238639a27791d8c53a0d44dd9758adcacb6bf5c4ed65d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for streamlit_annotation_editor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d02b1b4ee0c7cc8319deec9dbe0449b08601b1cab3ea982f7e2d828cb264f529
MD5 3728199846bb356422770f79ef0bdcac
BLAKE2b-256 370196f08ba2ff1fd1e462c1e9635795b16fb7c1c3855c3ef6b58a99b851a29a

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