Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Add default role Instructor and Students (manually add)
Browse files
ui.py
CHANGED
|
@@ -53,12 +53,15 @@ def render_chart(fig, tab, pdf_path, svg_path, pdf_name, svg_name, pdf_key, svg_
|
|
| 53 |
|
| 54 |
def render_categories_sidebar(currFile, categorySelections, all_speakers_display,
|
| 55 |
raw_to_display):
|
| 56 |
-
"""Render category multiselects, remove buttons, and Add role input."""
|
|
|
|
| 57 |
st.sidebar.markdown(
|
| 58 |
"<p style='font-size:0.85rem; color:gray; margin-bottom:2px;'>"
|
| 59 |
-
"
|
|
|
|
| 60 |
unsafe_allow_html=True,
|
| 61 |
)
|
|
|
|
| 62 |
for i, category in enumerate(st.session_state.categories):
|
| 63 |
ms_key = f"multiselect_{category}"
|
| 64 |
speakerSet = categorySelections[i]
|
|
@@ -77,7 +80,7 @@ def render_categories_sidebar(currFile, categorySelections, all_speakers_display
|
|
| 77 |
key=ms_key, on_change=updateCategoryOptions, args=(currFile,),
|
| 78 |
label_visibility="collapsed",
|
| 79 |
)
|
| 80 |
-
st.sidebar.text_input("Add role", key="categoryInput", on_change=addCategory)
|
| 81 |
|
| 82 |
|
| 83 |
# ---------------------------------------------------------------------------
|
|
|
|
| 53 |
|
| 54 |
def render_categories_sidebar(currFile, categorySelections, all_speakers_display,
|
| 55 |
raw_to_display):
|
| 56 |
+
"""Render category multiselects, remove buttons, and Add custom role input."""
|
| 57 |
+
st.sidebar.subheader("Add Speaker's Role")
|
| 58 |
st.sidebar.markdown(
|
| 59 |
"<p style='font-size:0.85rem; color:gray; margin-bottom:2px;'>"
|
| 60 |
+
"Add speaker(s) into the Instructor or Students role. You can also add a new role "
|
| 61 |
+
"by typing in the \"Add custom role\" textbox.</p>",
|
| 62 |
unsafe_allow_html=True,
|
| 63 |
)
|
| 64 |
+
st.sidebar.divider()
|
| 65 |
for i, category in enumerate(st.session_state.categories):
|
| 66 |
ms_key = f"multiselect_{category}"
|
| 67 |
speakerSet = categorySelections[i]
|
|
|
|
| 80 |
key=ms_key, on_change=updateCategoryOptions, args=(currFile,),
|
| 81 |
label_visibility="collapsed",
|
| 82 |
)
|
| 83 |
+
st.sidebar.text_input("Add custom role", key="categoryInput", on_change=addCategory)
|
| 84 |
|
| 85 |
|
| 86 |
# ---------------------------------------------------------------------------
|