Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Re-order and rename the tabs, and adjust the content
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ from state import (
|
|
| 24 |
init_session_state,
|
| 25 |
get_display_name, apply_speaker_renames_to_df, convert_df,
|
| 26 |
updateMultiSelect, store_speaker_clips, register_file, analyze,
|
| 27 |
-
load_demo_single, load_demo_multi, run_analysis_loop,
|
| 28 |
)
|
| 29 |
|
| 30 |
# ---------------------------------------------------------------------------
|
|
@@ -228,9 +228,9 @@ try:
|
|
| 228 |
raise ValueError("File not yet analyzed")
|
| 229 |
|
| 230 |
st.header(f"Analysis of file {currFile}")
|
| 231 |
-
TAB_NAMES = ["
|
| 232 |
-
"
|
| 233 |
-
|
| 234 |
|
| 235 |
currAnnotation, currTotalTime = st.session_state.results[currFile]
|
| 236 |
speakerNames = currAnnotation.labels()
|
|
@@ -284,8 +284,6 @@ try:
|
|
| 284 |
f"sonogram-analysis-{currPlainName}.csv", "text/csv",
|
| 285 |
key="download-csv", on_click="ignore",
|
| 286 |
)
|
| 287 |
-
tableDF = build_table_df(displayDF)
|
| 288 |
-
ui.render_data_table(tableDF, speakerNames, raw_to_display, currFile)
|
| 289 |
|
| 290 |
# -----------------------------------------------------------------------
|
| 291 |
# Tab: Rename Speaker
|
|
|
|
| 24 |
init_session_state,
|
| 25 |
get_display_name, apply_speaker_renames_to_df, convert_df,
|
| 26 |
updateMultiSelect, store_speaker_clips, register_file, analyze,
|
| 27 |
+
load_demo_single, load_demo_multi, run_analysis_loop,
|
| 28 |
)
|
| 29 |
|
| 30 |
# ---------------------------------------------------------------------------
|
|
|
|
| 228 |
raise ValueError("File not yet analyzed")
|
| 229 |
|
| 230 |
st.header(f"Analysis of file {currFile}")
|
| 231 |
+
TAB_NAMES = ["Rename Speaker", "Roles", "Categories",
|
| 232 |
+
"Treemap", "Timeline", "Time Spoken", "Data"]
|
| 233 |
+
renameTab, pie2, sunburst1, treemap1, timeline, bar1, dataTab = st.tabs(TAB_NAMES)
|
| 234 |
|
| 235 |
currAnnotation, currTotalTime = st.session_state.results[currFile]
|
| 236 |
speakerNames = currAnnotation.labels()
|
|
|
|
| 284 |
f"sonogram-analysis-{currPlainName}.csv", "text/csv",
|
| 285 |
key="download-csv", on_click="ignore",
|
| 286 |
)
|
|
|
|
|
|
|
| 287 |
|
| 288 |
# -----------------------------------------------------------------------
|
| 289 |
# Tab: Rename Speaker
|