Spaces:
Runtime error
Runtime error
Commit
·
8e681fa
1
Parent(s):
6be0e9c
Sort configs & splits alphabetically
Browse filesSorts dataset configs and splits alphabetically (as done with tasks and datasets) to make finding desired configs/splits more straightforward.
app.py
CHANGED
@@ -190,12 +190,12 @@ else:
|
|
190 |
dataset_df = dataset_df.dropna(axis="columns", how="all")
|
191 |
|
192 |
if len(dataset_df) > 0:
|
193 |
-
|
|
|
|
|
194 |
if "-unspecified-" in config_set:
|
195 |
-
|
196 |
-
selectable_configs = ["-unspecified-"] +
|
197 |
-
else:
|
198 |
-
selectable_configs = list(config_set)
|
199 |
|
200 |
if dataset != "-any-":
|
201 |
config = st.sidebar.selectbox(
|
@@ -206,12 +206,13 @@ if len(dataset_df) > 0:
|
|
206 |
)
|
207 |
dataset_df = dataset_df[dataset_df.config == config]
|
208 |
|
209 |
-
|
|
|
|
|
210 |
if "-unspecified-" in split_set:
|
211 |
-
|
212 |
-
selectable_splits = ["-unspecified-"] +
|
213 |
-
|
214 |
-
selectable_splits = list(split_set)
|
215 |
split = st.sidebar.selectbox(
|
216 |
"Split",
|
217 |
selectable_splits,
|
|
|
190 |
dataset_df = dataset_df.dropna(axis="columns", how="all")
|
191 |
|
192 |
if len(dataset_df) > 0:
|
193 |
+
selectable_configs = list(set(dataset_df["config"]))
|
194 |
+
selectable_configs.sort(key=lambda name: name.lower())
|
195 |
+
|
196 |
if "-unspecified-" in config_set:
|
197 |
+
selectable_configs.discard("-unspecified-")
|
198 |
+
selectable_configs = ["-unspecified-"] + selectable_configs
|
|
|
|
|
199 |
|
200 |
if dataset != "-any-":
|
201 |
config = st.sidebar.selectbox(
|
|
|
206 |
)
|
207 |
dataset_df = dataset_df[dataset_df.config == config]
|
208 |
|
209 |
+
selectable_splits = list(set(dataset_df["split"]))
|
210 |
+
selectable_splits.sort(key=lambda name: name.lower())
|
211 |
+
|
212 |
if "-unspecified-" in split_set:
|
213 |
+
selectable_splits.discard("-unspecified-")
|
214 |
+
selectable_splits = ["-unspecified-"] + selectable_splits
|
215 |
+
|
|
|
216 |
split = st.sidebar.selectbox(
|
217 |
"Split",
|
218 |
selectable_splits,
|