Spaces:
Running
Running
Tristan Thrush
commited on
Commit
•
04ce154
1
Parent(s):
bceb306
added option to select config and split
Browse files
app.py
CHANGED
@@ -148,6 +148,7 @@ dataset = st.sidebar.selectbox(
|
|
148 |
selectable_datasets,
|
149 |
index=selectable_datasets.index(default_dataset),
|
150 |
)
|
|
|
151 |
st.experimental_set_query_params(**{"dataset": [dataset]})
|
152 |
|
153 |
dataset_df = dataframe[dataframe.dataset == dataset]
|
@@ -156,6 +157,22 @@ dataset_df = dataset_df.dropna(axis="columns", how="all")
|
|
156 |
if only_verified_results:
|
157 |
dataset_df = dataset_df[dataset_df["verified"]]
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
selectable_metrics = list(filter(lambda column: column not in ("model_id", "dataset", "split", "config", "verified"), dataset_df.columns))
|
160 |
|
161 |
dataset_df = dataset_df.filter(["model_id"] + selectable_metrics)
|
|
|
148 |
selectable_datasets,
|
149 |
index=selectable_datasets.index(default_dataset),
|
150 |
)
|
151 |
+
|
152 |
st.experimental_set_query_params(**{"dataset": [dataset]})
|
153 |
|
154 |
dataset_df = dataframe[dataframe.dataset == dataset]
|
|
|
157 |
if only_verified_results:
|
158 |
dataset_df = dataset_df[dataset_df["verified"]]
|
159 |
|
160 |
+
if "config" in dataset_df.columns:
|
161 |
+
selectable_configs = list(set(dataset_df["config"]))
|
162 |
+
config = st.sidebar.selectbox(
|
163 |
+
"Config",
|
164 |
+
selectable_configs,
|
165 |
+
)
|
166 |
+
dataset_df = dataset_df[dataset_df.config == config]
|
167 |
+
|
168 |
+
if "split" in dataset_df.columns:
|
169 |
+
selectable_splits = list(set(dataset_df["split"]))
|
170 |
+
split = st.sidebar.selectbox(
|
171 |
+
"Split",
|
172 |
+
selectable_splits,
|
173 |
+
)
|
174 |
+
dataset_df = dataset_df[dataset_df.split == split]
|
175 |
+
|
176 |
selectable_metrics = list(filter(lambda column: column not in ("model_id", "dataset", "split", "config", "verified"), dataset_df.columns))
|
177 |
|
178 |
dataset_df = dataset_df.filter(["model_id"] + selectable_metrics)
|