in widgets/text_lengths.py [0:0]
def render(self):
with gr.TabItem("Text Lengths"):
gr.Markdown(
"Use this widget to identify outliers, particularly suspiciously long outliers."
)
gr.Markdown(
"Below, you can see how the lengths of the text instances in your "
"dataset are distributed."
)
gr.Markdown(
"Any unexpected peaks or valleys in the distribution may help to "
"identify instances you want to remove or augment."
)
gr.Markdown(
"### Here is the count of different text lengths in " "your dataset:"
)
# When matplotlib first creates this, it's a Figure.
# Once it's saved, then read back in,
# it's an ndarray that must be displayed using st.image
# (I know, lame).
self.text_length_distribution_plot.render()
self.text_length_explainer.render()
self.text_length_drop_down.render()
self.text_length_df.render()