Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Make visual changes to multi-file summary data
Browse files
ui.py
CHANGED
|
@@ -426,22 +426,20 @@ def render_multifile_summary(plotly_config=None):
|
|
| 426 |
st.session_state.categories, st.session_state.categorySelect,
|
| 427 |
speakerRenames=st.session_state.speakerRenames,
|
| 428 |
)
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 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
|
| 439 |
-
(["Multi Voice", "Single Voice"], True, "Cross-file Voice Categories sorted
|
| 440 |
-
(["No Voice", "Multi Voice"], False, "Cross-file Voice Categories sorted
|
| 441 |
]:
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
)
|
|
|
|
| 426 |
st.session_state.categories, st.session_state.categorySelect,
|
| 427 |
speakerRenames=st.session_state.speakerRenames,
|
| 428 |
)
|
| 429 |
+
fig6 = px.bar(df6, x="files", y=allCategories,
|
| 430 |
+
title="Proportion of File Duration Spoken by Each Speaker/Role")
|
| 431 |
+
fig6.update_layout(yaxis_title="Proportion of File Duration")
|
| 432 |
+
st.plotly_chart(fig6, use_container_width=True, config=cfg)
|
|
|
|
| 433 |
st.caption("Note: Overlaps between speakers of the same role are only counted once.")
|
| 434 |
|
| 435 |
df7, _ = utils.build_multifile_voice_df(validNames, st.session_state.summaries)
|
| 436 |
for sort_cols, ascending, title in [
|
| 437 |
+
(["Single Voice", "Multi Voice"], True, "Cross-file Voice Categories sorted by Single Voice (least → most)"),
|
| 438 |
+
(["Multi Voice", "Single Voice"], True, "Cross-file Voice Categories sorted by Multi Voice (least → most)"),
|
| 439 |
+
(["No Voice", "Multi Voice"], False, "Cross-file Voice Categories sorted by No Voice (most → least)"),
|
| 440 |
]:
|
| 441 |
+
fig7 = px.bar(df7.sort_values(by=sort_cols, ascending=ascending),
|
| 442 |
+
x="files", y=["Single Voice", "Multi Voice", "No Voice"],
|
| 443 |
+
title=title)
|
| 444 |
+
fig7.update_layout(yaxis_title="Proportion of File Duration")
|
| 445 |
+
st.plotly_chart(fig7, use_container_width=True, config=cfg)
|
|
|