Spaces:
Runtime error
Runtime error
Replace conditioning checkbox with radio button
Browse files
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 |
-
|
|
|
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.
|
196 |
-
choices=["category", "text"],
|
197 |
-
value=
|
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 |
|