Corey Morris commited on
Commit
28e8799
1 Parent(s): 667f9a4

loading from csv instead of processing data each time

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -5,11 +5,11 @@ from result_data_processor import ResultDataProcessor
5
  import matplotlib.pyplot as plt
6
  import numpy as np
7
  import plotly.graph_objects as go
8
- from streamlit.components.v1 import html
9
 
10
  st.set_page_config(layout="wide")
11
 
12
  def load_csv_data(file_path):
 
13
  return pd.read_csv(file_path)
14
 
15
 
@@ -109,7 +109,7 @@ def find_top_differences_table(df, target_model, closest_models, num_differences
109
  unique_top_differences_tasks = list(set(top_differences_table['Task'].tolist()))
110
  return top_differences_table, unique_top_differences_tasks
111
 
112
- data_provider = ResultDataProcessor()
113
 
114
  # st.title('Model Evaluation Results including MMLU by task')
115
  st.title('Exploring the Characteristics of Large Language Models: An Interactive Portal for Analyzing 1100+ Open Source Models Across 57 Diverse Evaluation Tasks')
@@ -131,27 +131,29 @@ data_df = load_csv_data(data_path)
131
  filters = st.checkbox('Select Models and/or Evaluations')
132
 
133
  # Initialize selected columns with "Parameters" and "MMLU_average" if filters are checked
134
- selected_columns = ['Parameters', 'MMLU_average'] if filters else data_provider.data.columns.tolist()
 
135
 
136
  # Initialize selected models as empty if filters are checked
137
- selected_models = [] if filters else data_provider.data.index.tolist()
138
 
139
  if filters:
140
  # Create multi-select for columns with default selection
141
  selected_columns = st.multiselect(
142
  'Select Columns',
143
- data_provider.data.columns.tolist(),
144
  default=selected_columns
145
  )
146
 
147
  # Create multi-select for models without default selection
148
  selected_models = st.multiselect(
149
  'Select Models',
150
- data_provider.data.index.tolist()
151
  )
152
 
153
  # Get the filtered data
154
- filtered_data = data_provider.get_data(selected_models)
 
155
 
156
  # sort the table by the MMLU_average column
157
  filtered_data = filtered_data.sort_values(by=['MMLU_average'], ascending=False)
 
5
  import matplotlib.pyplot as plt
6
  import numpy as np
7
  import plotly.graph_objects as go
 
8
 
9
  st.set_page_config(layout="wide")
10
 
11
  def load_csv_data(file_path):
12
+
13
  return pd.read_csv(file_path)
14
 
15
 
 
109
  unique_top_differences_tasks = list(set(top_differences_table['Task'].tolist()))
110
  return top_differences_table, unique_top_differences_tasks
111
 
112
+ # data_provider = ResultDataProcessor()
113
 
114
  # st.title('Model Evaluation Results including MMLU by task')
115
  st.title('Exploring the Characteristics of Large Language Models: An Interactive Portal for Analyzing 1100+ Open Source Models Across 57 Diverse Evaluation Tasks')
 
131
  filters = st.checkbox('Select Models and/or Evaluations')
132
 
133
  # Initialize selected columns with "Parameters" and "MMLU_average" if filters are checked
134
+ # selected_columns = ['Parameters', 'MMLU_average'] if filters else data_provider.data.columns.tolist()
135
+ selected_columns = ['Parameters', 'MMLU_average'] if filters else data_df.columns.tolist()
136
 
137
  # Initialize selected models as empty if filters are checked
138
+ selected_models = [] if filters else data_df.index.tolist()
139
 
140
  if filters:
141
  # Create multi-select for columns with default selection
142
  selected_columns = st.multiselect(
143
  'Select Columns',
144
+ data_df.columns.tolist(),
145
  default=selected_columns
146
  )
147
 
148
  # Create multi-select for models without default selection
149
  selected_models = st.multiselect(
150
  'Select Models',
151
+ data_df.index.tolist()
152
  )
153
 
154
  # Get the filtered data
155
+ # filtered_data = data_provider.get_data(selected_models)
156
+ filtered_data = data_df
157
 
158
  # sort the table by the MMLU_average column
159
  filtered_data = filtered_data.sort_values(by=['MMLU_average'], ascending=False)