Ludvig commited on
Commit
747851f
·
1 Parent(s): adb698c
Files changed (2) hide show
  1. README.md +4 -0
  2. design.py +12 -2
README.md CHANGED
@@ -19,3 +19,7 @@ Streamlit application for plotting a confusion matrix.
19
  - Add full reset button (empty cache on different files) - callback?
20
  - Add option to change zero-tile background (e.g. to black for black backgrounds)
21
  - Add option to format total-count tile in sum tiles
 
 
 
 
 
19
  - Add full reset button (empty cache on different files) - callback?
20
  - Add option to change zero-tile background (e.g. to black for black backgrounds)
21
  - Add option to format total-count tile in sum tiles
22
+ - Selectable templates (for 2,3,4,5 classes - one selects num classes and pick a color scheme and other common defaults)
23
+ - Add extra column in `Upload counts` that replaces whichever value is the bottom value (normally counts). Requires changes to cvms.
24
+ - Allow handling tick text - e.g. for long class names or many classes.
25
+ - Enable class order reversal after cvms arrow bug is fixed
design.py CHANGED
@@ -68,7 +68,7 @@ def design_section(
68
  return default
69
 
70
  with st.form(key="settings_form"):
71
- col1, col2 = st.columns(2)
72
  with col1:
73
  selected_classes = st.multiselect(
74
  "Select classes (min=2, order is respected)",
@@ -78,7 +78,15 @@ def design_section(
78
  "Any observation with either a target or prediction "
79
  "of another class is excluded.",
80
  )
 
 
 
81
  with col2:
 
 
 
 
 
82
  pass
83
 
84
  # Color palette
@@ -159,7 +167,7 @@ def design_section(
159
  ),
160
  )
161
  output["counts_on_top"] = st.checkbox(
162
- "Counts on top (not working)",
163
  value=get_uploaded_setting(
164
  key="counts_on_top", default=False, type_=bool
165
  ),
@@ -446,6 +454,8 @@ def design_section(
446
  # Save settings as json
447
  with open(design_settings_store_path, "w") as f:
448
  json.dump(output, f)
 
 
449
 
450
  design_ready = False
451
  if st.session_state["step"] >= 3:
 
68
  return default
69
 
70
  with st.form(key="settings_form"):
71
+ col1, col2, col3 = st.columns([4, 2, 2])
72
  with col1:
73
  selected_classes = st.multiselect(
74
  "Select classes (min=2, order is respected)",
 
78
  "Any observation with either a target or prediction "
79
  "of another class is excluded.",
80
  )
81
+ # TODO: Once the arrow bug in cvms is fixed, enable reversing!
82
+ # Reverse by default
83
+ # selected_classes.reverse()
84
  with col2:
85
+ # st.write(" ")
86
+ # st.write(" ")
87
+ # reverse_class_order = st.checkbox(
88
+ # "Reverse order", value=False, help="Reverse the order of the classes."
89
+ # )
90
  pass
91
 
92
  # Color palette
 
167
  ),
168
  )
169
  output["counts_on_top"] = st.checkbox(
170
+ "Counts on top",
171
  value=get_uploaded_setting(
172
  key="counts_on_top", default=False, type_=bool
173
  ),
 
454
  # Save settings as json
455
  with open(design_settings_store_path, "w") as f:
456
  json.dump(output, f)
457
+ # if reverse_class_order:
458
+ # selected_classes.reverse()
459
 
460
  design_ready = False
461
  if st.session_state["step"] >= 3: