Corey Morris
commited on
Commit
•
1a1910c
1
Parent(s):
d96fdf9
WIP. Loading data from csv
Browse files- app.py +6 -13
- result_data_processor.py +4 -0
app.py
CHANGED
@@ -9,19 +9,8 @@ from streamlit.components.v1 import html
|
|
9 |
|
10 |
st.set_page_config(layout="wide")
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
<!-- Google tag (gtag.js) -->
|
15 |
-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MT9QYR70MC"></script>
|
16 |
-
<script>
|
17 |
-
window.dataLayer = window.dataLayer || [];
|
18 |
-
function gtag(){dataLayer.push(arguments);}
|
19 |
-
gtag('js', new Date());
|
20 |
-
gtag('config', 'G-MT9QYR70MC');
|
21 |
-
</script>
|
22 |
-
"""
|
23 |
-
html(google_analytics_code, height=0)
|
24 |
-
|
25 |
|
26 |
|
27 |
def plot_top_n(df, target_column, n=10):
|
@@ -135,6 +124,10 @@ st.markdown("""
|
|
135 |
[Preliminary analysis of MMLU-by-Task data](https://coreymorrisdata.medium.com/preliminary-analysis-of-mmlu-evaluation-data-insights-from-500-open-source-models-e67885aa364b)
|
136 |
""")
|
137 |
|
|
|
|
|
|
|
|
|
138 |
filters = st.checkbox('Select Models and/or Evaluations')
|
139 |
|
140 |
# Initialize selected columns with "Parameters" and "MMLU_average" if filters are checked
|
|
|
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 |
|
16 |
def plot_top_n(df, target_column, n=10):
|
|
|
124 |
[Preliminary analysis of MMLU-by-Task data](https://coreymorrisdata.medium.com/preliminary-analysis-of-mmlu-evaluation-data-insights-from-500-open-source-models-e67885aa364b)
|
125 |
""")
|
126 |
|
127 |
+
# Load the data into memory
|
128 |
+
data_path = "result_data.csv" # Replace with your actual file path
|
129 |
+
data_df = load_csv_data(data_path)
|
130 |
+
|
131 |
filters = st.checkbox('Select Models and/or Evaluations')
|
132 |
|
133 |
# Initialize selected columns with "Parameters" and "MMLU_average" if filters are checked
|
result_data_processor.py
CHANGED
@@ -156,6 +156,10 @@ class ResultDataProcessor:
|
|
156 |
|
157 |
data = self.manual_removal_of_models(data)
|
158 |
|
|
|
|
|
|
|
|
|
159 |
return data
|
160 |
|
161 |
def manual_removal_of_models(self, df):
|
|
|
156 |
|
157 |
data = self.manual_removal_of_models(data)
|
158 |
|
159 |
+
# save to csv with the current date as part of the filename
|
160 |
+
|
161 |
+
data.to_csv(f'processed_data_{pd.Timestamp.now().strftime("%Y-%m-%d")}.csv')
|
162 |
+
|
163 |
return data
|
164 |
|
165 |
def manual_removal_of_models(self, df):
|