Spaces:
Sleeping
Sleeping
Visual update on multi-file sub menu
Browse files
ui.py
CHANGED
|
@@ -424,22 +424,24 @@ def render_multifile_summary(plotly_config=None):
|
|
| 424 |
df6, allCategories = utils.build_multifile_category_df(
|
| 425 |
validNames, st.session_state.results, st.session_state.summaries,
|
| 426 |
st.session_state.categories, st.session_state.categorySelect,
|
|
|
|
| 427 |
)
|
| 428 |
st.plotly_chart(
|
| 429 |
px.bar(df6, x="files", y=allCategories,
|
| 430 |
-
title="Time Spoken by Each Speaker in Each File"),
|
| 431 |
use_container_width=True, config=cfg,
|
| 432 |
)
|
|
|
|
| 433 |
|
| 434 |
df7, _ = utils.build_multifile_voice_df(validNames, st.session_state.summaries)
|
| 435 |
for sort_cols, ascending, title in [
|
| 436 |
-
(["
|
| 437 |
-
(["Multi Voice","
|
| 438 |
-
(["No Voice",
|
| 439 |
]:
|
| 440 |
st.plotly_chart(
|
| 441 |
px.bar(df7.sort_values(by=sort_cols, ascending=ascending),
|
| 442 |
-
x="files", y=["
|
| 443 |
title=title),
|
| 444 |
use_container_width=True, config=cfg,
|
| 445 |
)
|
|
|
|
| 424 |
df6, allCategories = utils.build_multifile_category_df(
|
| 425 |
validNames, st.session_state.results, st.session_state.summaries,
|
| 426 |
st.session_state.categories, st.session_state.categorySelect,
|
| 427 |
+
speakerRenames=st.session_state.speakerRenames,
|
| 428 |
)
|
| 429 |
st.plotly_chart(
|
| 430 |
px.bar(df6, x="files", y=allCategories,
|
| 431 |
+
title="Time Spoken by Each Speaker/Role in Each File"),
|
| 432 |
use_container_width=True, config=cfg,
|
| 433 |
)
|
| 434 |
+
st.caption("Note: Overlaps between speakers of the same role are only counted once.")
|
| 435 |
|
| 436 |
df7, _ = utils.build_multifile_voice_df(validNames, st.session_state.summaries)
|
| 437 |
for sort_cols, ascending, title in [
|
| 438 |
+
(["Single Voice", "Multi Voice"], True, "Cross-file Voice Categories sorted for Single Voice"),
|
| 439 |
+
(["Multi Voice", "Single Voice"], True, "Cross-file Voice Categories sorted for Multi Voice"),
|
| 440 |
+
(["No Voice", "Multi Voice"], False, "Cross-file Voice Categories sorted for Any Voice"),
|
| 441 |
]:
|
| 442 |
st.plotly_chart(
|
| 443 |
px.bar(df7.sort_values(by=sort_cols, ascending=ascending),
|
| 444 |
+
x="files", y=["Single Voice", "Multi Voice", "No Voice"],
|
| 445 |
title=title),
|
| 446 |
use_container_width=True, config=cfg,
|
| 447 |
)
|