streamlit-annotation-tools icon indicating copy to clipboard operation
streamlit-annotation-tools copied to clipboard

Component Error when attempting to use pre-defined label List

Open BillCM opened this issue 5 months ago • 3 comments

I've started receiving this error whenever I try to pass a label list as input to the text_labeler().

Dependencies: python 3.11.4 streamlit==1.31.0 streamlit-annotation-tools==1.0.1

col1, col2 = st.columns(2)

with col1:
    st.header("Document")
    annotations = text_labeler(text=get_document(), labels=['one', 'two', 'three'])

with col2:
    st.header("Abstracted Fields")
    st.write(annotations)

ERROR: text_labeler component is not presented. However, the annotations object is presented as expected

Component Error n.sort is not a function. (In 'n.sort(((e,t)=>e.start-t.start))', 'n.sort' is undefined)

Chrome Inspector shows the following error, but JS is enabled. Same on Brave and Safari. <noscript>You need to enable JavaScript to run this app.</noscript>

Removing the labels allows the text_labeler to render. annotations = text_labeler(doc_text)

  • web component loads and I can label without error

BillCM avatar Feb 05 '24 21:02 BillCM