duongthienz commited on
Commit
53e08d0
·
verified ·
1 Parent(s): 766e9cd

Removed Voice Categories tab

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -302,9 +302,9 @@ try:
302
  raise ValueError("File not yet analyzed")
303
 
304
  st.header(f"Analysis of file {currFile}")
305
- TAB_NAMES = ["Data", "Voice Categories", "Speaker Percentage",
306
  "Speakers with Categories", "Treemap", "Timeline", "Time Spoken"]
307
- dataTab, pie1, pie2, sunburst1, treemap1, timeline, bar1 = st.tabs(TAB_NAMES)
308
 
309
  currAnnotation, currTotalTime = st.session_state.results[currFile]
310
  speakerNames = currAnnotation.labels()
@@ -481,7 +481,7 @@ try:
481
  header_cols[-2].markdown("**Clip**")
482
  header_cols[-1].markdown("** **", unsafe_allow_html=True)
483
 
484
- st.divider()
485
 
486
  # Track which speakers have already had their clip rendered
487
  # so we only show it once (on the first row for that speaker).
@@ -524,13 +524,6 @@ try:
524
  df5 = st.session_state.summaries[currFile]["df5"].copy()
525
  df2 = st.session_state.summaries[currFile]["df2"].copy()
526
 
527
- _render_chart(
528
- utils.build_fig_pie1(df3, catTypeColors), pie1,
529
- "ascn_pie1.pdf", "ascn_pie1.svg",
530
- f"sonogram-voice-category-{currPlainName}.pdf",
531
- f"sonogram-voice-category-{currPlainName}.svg",
532
- "download-pdf1", "download-svg1",
533
- )
534
  _render_chart(
535
  utils.build_fig_pie2(df4, speakerNames, speakerColors, catColors, get_display_name, currFile),
536
  pie2,
 
302
  raise ValueError("File not yet analyzed")
303
 
304
  st.header(f"Analysis of file {currFile}")
305
+ TAB_NAMES = ["Data", "Categories Percentage",
306
  "Speakers with Categories", "Treemap", "Timeline", "Time Spoken"]
307
+ dataTab, pie2, sunburst1, treemap1, timeline, bar1 = st.tabs(TAB_NAMES)
308
 
309
  currAnnotation, currTotalTime = st.session_state.results[currFile]
310
  speakerNames = currAnnotation.labels()
 
481
  header_cols[-2].markdown("**Clip**")
482
  header_cols[-1].markdown("** **", unsafe_allow_html=True)
483
 
484
+ st.markdown("<hr style='margin-top:2px; margin-bottom:4px;'>", unsafe_allow_html=True)
485
 
486
  # Track which speakers have already had their clip rendered
487
  # so we only show it once (on the first row for that speaker).
 
524
  df5 = st.session_state.summaries[currFile]["df5"].copy()
525
  df2 = st.session_state.summaries[currFile]["df2"].copy()
526
 
 
 
 
 
 
 
 
527
  _render_chart(
528
  utils.build_fig_pie2(df4, speakerNames, speakerColors, catColors, get_display_name, currFile),
529
  pie2,