Closed jithurjacob closed 3 years ago
I strongly support the upper idea. It seems to be very limited in space. About 4 rows.
This should do the trick https://github.com/tvst/st-annotated-text/pull/7
Merged.
Hi @tvst , Im using below code to annotate sentence
def annotate_answer(answer, context): start_idx = context.find(answer) end_idx = start_idx + len(answer)
height = int(len(context) * 0.25) + 5
annotated_text(context[:start_idx], (answer, "Moderate", "#8ef"), context[end_idx:], height=height)
if (row["label"] == 1):
annotate_answer(s, s)
context Im passing is full sentence. And I want to annotate full sentence. Im seeing it getting annotated but there is gap between the sentences after annotation and sometimes not able to some of the text if the sentence is too big. Can you please let me know how to caluculate dynamically [height?] I tried to play with height parameter in the method but no luck... If I reduce height, lines are missing... If I increase height, space after the line is too big
Please provide an option to set the height of the output iframe. https://docs.streamlit.io/en/stable/develop_streamlit_components.html#streamlit.components.v1.html