Slep commited on
Commit
495ed17
1 Parent(s): 63825b4

Replace conditioning checkbox with radio button

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -130,7 +130,8 @@ def filter_dataframe(df, k_filter, d_filter, c_filter):
130
  df = df[selected_columns]
131
 
132
  # ===== FILTER ROWS
133
- df = df[df[EXPECTED_KEY_TO_COLNAME["conditioning"]].isin(c_filter)]
 
134
 
135
  return df[selected_columns], datatypes
136
 
@@ -192,9 +193,9 @@ if __name__ == "__main__":
192
  value=DIST_EVALUATIONS,
193
  label="Number of Distractors",
194
  )
195
- c_filter = gr.CheckboxGroup(
196
- choices=["category", "text"],
197
- value=["category", "text"],
198
  label="Conditioning",
199
  )
200
 
 
130
  df = df[selected_columns]
131
 
132
  # ===== FILTER ROWS
133
+ if c_filter != "all":
134
+ df = df[df[EXPECTED_KEY_TO_COLNAME["conditioning"]] == c_filter]
135
 
136
  return df[selected_columns], datatypes
137
 
 
193
  value=DIST_EVALUATIONS,
194
  label="Number of Distractors",
195
  )
196
+ c_filter = gr.Radio(
197
+ choices=["all", "category", "text"],
198
+ value="all",
199
  label="Conditioning",
200
  )
201