Corey Morris
commited on
Commit
•
0a33874
1
Parent(s):
3abc48f
Modified the selection of models and evaluations so that most do not show up by default. for a better user experience with 700+ models
Browse files
app.py
CHANGED
@@ -60,28 +60,32 @@ st.markdown("""
|
|
60 |
|
61 |
filters = st.checkbox('Select Models and Evaluations')
|
62 |
|
63 |
-
#
|
64 |
-
selected_columns = data_provider.data.columns.tolist()
|
65 |
-
|
|
|
|
|
66 |
|
67 |
if filters:
|
68 |
-
# Create
|
69 |
selected_columns = st.multiselect(
|
70 |
'Select Columns',
|
71 |
data_provider.data.columns.tolist(),
|
72 |
default=selected_columns
|
73 |
)
|
74 |
|
|
|
75 |
selected_models = st.multiselect(
|
76 |
'Select Models',
|
77 |
-
data_provider.data.index.tolist()
|
78 |
-
default=selected_models
|
79 |
)
|
80 |
|
81 |
# Get the filtered data
|
82 |
-
st.header('Sortable table')
|
83 |
filtered_data = data_provider.get_data(selected_models)
|
84 |
|
|
|
|
|
|
|
85 |
# sort the table by the MMLU_average column
|
86 |
filtered_data = filtered_data.sort_values(by=['MMLU_average'], ascending=False)
|
87 |
|
|
|
60 |
|
61 |
filters = st.checkbox('Select Models and Evaluations')
|
62 |
|
63 |
+
# Initialize selected columns with "Parameters" and "MMLU_average" if filters are checked
|
64 |
+
selected_columns = ['Parameters', 'MMLU_average'] if filters else data_provider.data.columns.tolist()
|
65 |
+
|
66 |
+
# Initialize selected models as empty if filters are checked
|
67 |
+
selected_models = [] if filters else data_provider.data.index.tolist()
|
68 |
|
69 |
if filters:
|
70 |
+
# Create multi-select for columns with default selection
|
71 |
selected_columns = st.multiselect(
|
72 |
'Select Columns',
|
73 |
data_provider.data.columns.tolist(),
|
74 |
default=selected_columns
|
75 |
)
|
76 |
|
77 |
+
# Create multi-select for models without default selection
|
78 |
selected_models = st.multiselect(
|
79 |
'Select Models',
|
80 |
+
data_provider.data.index.tolist()
|
|
|
81 |
)
|
82 |
|
83 |
# Get the filtered data
|
|
|
84 |
filtered_data = data_provider.get_data(selected_models)
|
85 |
|
86 |
+
|
87 |
+
|
88 |
+
|
89 |
# sort the table by the MMLU_average column
|
90 |
filtered_data = filtered_data.sort_values(by=['MMLU_average'], ascending=False)
|
91 |
|