Spaces:
Runtime error
Runtime error
ercanburak
commited on
Commit
•
8f43f06
1
Parent(s):
026b32c
first select dataset, than model. do not enable metric selection if no models selected
Browse files
app.py
CHANGED
@@ -177,9 +177,6 @@ assert len(set(model_display_names)) == len(model_display_names), "Model display
|
|
177 |
assert len(set(metric_display_names)) == len(metric_display_names), "Metric display names are not unique"
|
178 |
assert len(set(viz_display_names)) == len(viz_display_names), "Viz display names are not unique"
|
179 |
|
180 |
-
selected_model_names = st.multiselect('Select multiple methods to compare', model_display_names)
|
181 |
-
selected_models = [model for model in models if model['display_name'] in selected_model_names]
|
182 |
-
|
183 |
col1, col2 = st.columns(2)
|
184 |
|
185 |
with col1:
|
@@ -189,10 +186,21 @@ with col1:
|
|
189 |
with col2:
|
190 |
selected_sequence = st.selectbox('Select sequence', options=selected_dataset["sequences"].keys())
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
usable_metrics = [metric for metric in metrics if metric['no_ref'] == selected_dataset['no_ref']]
|
193 |
usable_metric_display_names = get_display_names(usable_metrics)
|
194 |
|
195 |
-
selected_metric_names = st.multiselect('Select metrics to display', usable_metric_display_names
|
|
|
196 |
selected_metrics = [metric for metric in usable_metrics if metric['display_name'] in selected_metric_names]
|
197 |
|
198 |
if not selected_dataset['has_frames']:
|
|
|
177 |
assert len(set(metric_display_names)) == len(metric_display_names), "Metric display names are not unique"
|
178 |
assert len(set(viz_display_names)) == len(viz_display_names), "Viz display names are not unique"
|
179 |
|
|
|
|
|
|
|
180 |
col1, col2 = st.columns(2)
|
181 |
|
182 |
with col1:
|
|
|
186 |
with col2:
|
187 |
selected_sequence = st.selectbox('Select sequence', options=selected_dataset["sequences"].keys())
|
188 |
|
189 |
+
selected_model_names = st.multiselect('Select multiple methods to compare', model_display_names)
|
190 |
+
selected_models = [model for model in models if model['display_name'] in selected_model_names]
|
191 |
+
|
192 |
+
disable_metrics = len(selected_models) == 0
|
193 |
+
|
194 |
+
if disable_metrics:
|
195 |
+
tooltip_str = "Select at least one method to enable metric selection"
|
196 |
+
else:
|
197 |
+
tooltip_str = ""
|
198 |
+
|
199 |
usable_metrics = [metric for metric in metrics if metric['no_ref'] == selected_dataset['no_ref']]
|
200 |
usable_metric_display_names = get_display_names(usable_metrics)
|
201 |
|
202 |
+
selected_metric_names = st.multiselect('Select metrics to display', usable_metric_display_names,
|
203 |
+
disabled=disable_metrics, help=tooltip_str)
|
204 |
selected_metrics = [metric for metric in usable_metrics if metric['display_name'] in selected_metric_names]
|
205 |
|
206 |
if not selected_dataset['has_frames']:
|