duongthienz commited on
Commit
91cc602
·
verified ·
1 Parent(s): edc5c09

update multi-file visualization

Browse files
Files changed (1) hide show
  1. ui.py +6 -6
ui.py CHANGED
@@ -400,14 +400,14 @@ def render_multifile_summary(plotly_config=None):
400
  st.session_state.categories, st.session_state.categorySelect,
401
  speakerRenames=st.session_state.speakerRenames,
402
  )
403
- df7, _ = utils.build_multifile_voice_df(validNames, st.session_state.summaries)
404
 
405
  fig6 = px.bar(df6, x="files", y=allCategories,
406
- title="Proportion of File Duration Spoken by Each Speaker/Role *")
407
- fig6.update_layout(yaxis_title="Proportion of File Duration")
408
  st.plotly_chart(fig6, use_container_width=True, config=cfg)
409
  st.caption(
410
- "*Note: Proportion may not sum to 1 as overlaps between speakers "
411
  "are only counted once."
412
  )
413
 
@@ -428,7 +428,7 @@ def render_multifile_summary(plotly_config=None):
428
  x="files", y=["Single Voice", "Multi Voice", "No Voice"],
429
  title=f"Cross-file Voice Categories sorted by {selected_sort}",
430
  )
431
- fig7.update_layout(yaxis_title="Proportion of File Duration")
432
  st.plotly_chart(fig7, use_container_width=True, config=cfg)
433
 
434
  st.divider()
@@ -458,5 +458,5 @@ def render_multifile_summary(plotly_config=None):
458
  x="files", y=role_voice_cols,
459
  title=f"Cross-file Role & Voice Breakdown sorted by {selected_role_sort}",
460
  )
461
- fig8.update_layout(yaxis_title="Proportion of File Duration")
462
  st.plotly_chart(fig8, use_container_width=True, config=cfg)
 
400
  st.session_state.categories, st.session_state.categorySelect,
401
  speakerRenames=st.session_state.speakerRenames,
402
  )
403
+ df7, _ = utils.build_multifile_voice_df(validNames, st.session_state.results)
404
 
405
  fig6 = px.bar(df6, x="files", y=allCategories,
406
+ title="% of File Duration Spoken by Each Speaker/Role *")
407
+ fig6.update_layout(yaxis_title="% of File Duration")
408
  st.plotly_chart(fig6, use_container_width=True, config=cfg)
409
  st.caption(
410
+ "*Note: Values may not sum to 100% as overlaps between speakers "
411
  "are only counted once."
412
  )
413
 
 
428
  x="files", y=["Single Voice", "Multi Voice", "No Voice"],
429
  title=f"Cross-file Voice Categories sorted by {selected_sort}",
430
  )
431
+ fig7.update_layout(yaxis_title="% of File Duration")
432
  st.plotly_chart(fig7, use_container_width=True, config=cfg)
433
 
434
  st.divider()
 
458
  x="files", y=role_voice_cols,
459
  title=f"Cross-file Role & Voice Breakdown sorted by {selected_role_sort}",
460
  )
461
+ fig8.update_layout(yaxis_title="% of File Duration")
462
  st.plotly_chart(fig8, use_container_width=True, config=cfg)