Spaces:
Sleeping
Sleeping
Update ui.py
Browse files
ui.py
CHANGED
|
@@ -379,13 +379,13 @@ def render_speaker_samples_tab(speakerNames, raw_to_display, currFile):
|
|
| 379 |
# ---------------------------------------------------------------------------
|
| 380 |
|
| 381 |
def render_multifile_summary(plotly_config=None):
|
| 382 |
-
"""Render the Multi-file
|
| 383 |
cfg = plotly_config or {"displayModeBar": True, "modeBarButtonsToRemove": []}
|
| 384 |
if not st.session_state.results:
|
| 385 |
return
|
| 386 |
|
| 387 |
-
with st.expander("Multi-file
|
| 388 |
-
st.header("Multi-file
|
| 389 |
with st.spinner("Processing summary results..."):
|
| 390 |
validNames = [
|
| 391 |
fn for fn in st.session_state.file_names
|
|
@@ -431,7 +431,7 @@ def render_multifile_summary(plotly_config=None):
|
|
| 431 |
fig6_sort_col, fig6_ascending = "files", True
|
| 432 |
fig6 = px.bar(df6.sort_values(fig6_sort_col, ascending=fig6_ascending),
|
| 433 |
x="files", y=allCategories,
|
| 434 |
-
title=f"Percent of
|
| 435 |
labels={"files": "Files"},
|
| 436 |
color_discrete_map=role_color_map,
|
| 437 |
hover_data={"files": True})
|
|
@@ -453,7 +453,7 @@ def render_multifile_summary(plotly_config=None):
|
|
| 453 |
fig7 = px.bar(
|
| 454 |
df7.sort_values(by=sort_col, ascending=ascending),
|
| 455 |
x="files", y=["Single Voice", "Multi Voice", "No Voice"],
|
| 456 |
-
title=f"Cross-
|
| 457 |
labels={"files": "Files"},
|
| 458 |
color_discrete_map=voice_color_map,
|
| 459 |
hover_data={"files": True},
|
|
@@ -493,7 +493,7 @@ def render_multifile_summary(plotly_config=None):
|
|
| 493 |
color_discrete_map=role_voice_color_map,
|
| 494 |
labels={"files": "Files"},
|
| 495 |
hover_data={"files": True},
|
| 496 |
-
title=f"Cross-
|
| 497 |
)
|
| 498 |
fig8.update_layout(yaxis_title="% of File Duration")
|
| 499 |
fig8.update_xaxes(showticklabels=False)
|
|
|
|
| 379 |
# ---------------------------------------------------------------------------
|
| 380 |
|
| 381 |
def render_multifile_summary(plotly_config=None):
|
| 382 |
+
"""Render the Multi-file summary data expander if enough files are analyzed."""
|
| 383 |
cfg = plotly_config or {"displayModeBar": True, "modeBarButtonsToRemove": []}
|
| 384 |
if not st.session_state.results:
|
| 385 |
return
|
| 386 |
|
| 387 |
+
with st.expander("Multi-file summary data"):
|
| 388 |
+
st.header("Multi-file summary data")
|
| 389 |
with st.spinner("Processing summary results..."):
|
| 390 |
validNames = [
|
| 391 |
fn for fn in st.session_state.file_names
|
|
|
|
| 431 |
fig6_sort_col, fig6_ascending = "files", True
|
| 432 |
fig6 = px.bar(df6.sort_values(fig6_sort_col, ascending=fig6_ascending),
|
| 433 |
x="files", y=allCategories,
|
| 434 |
+
title=f"Percent of file duration spoken by each speaker/role sorted by {selected_fig6_sort}",
|
| 435 |
labels={"files": "Files"},
|
| 436 |
color_discrete_map=role_color_map,
|
| 437 |
hover_data={"files": True})
|
|
|
|
| 453 |
fig7 = px.bar(
|
| 454 |
df7.sort_values(by=sort_col, ascending=ascending),
|
| 455 |
x="files", y=["Single Voice", "Multi Voice", "No Voice"],
|
| 456 |
+
title=f"Cross-file voice categories sorted by {selected_sort}",
|
| 457 |
labels={"files": "Files"},
|
| 458 |
color_discrete_map=voice_color_map,
|
| 459 |
hover_data={"files": True},
|
|
|
|
| 493 |
color_discrete_map=role_voice_color_map,
|
| 494 |
labels={"files": "Files"},
|
| 495 |
hover_data={"files": True},
|
| 496 |
+
title=f"Cross-file role and voice breakdown sorted by {selected_role_sort}",
|
| 497 |
)
|
| 498 |
fig8.update_layout(yaxis_title="% of File Duration")
|
| 499 |
fig8.update_xaxes(showticklabels=False)
|