Spaces:
Running
Running
natolambert
commited on
Commit
•
590ad01
1
Parent(s):
0de05c0
up
Browse files
app.py
CHANGED
@@ -221,9 +221,6 @@ def regex_table(dataframe, regex, filter_button):
|
|
221 |
# Filter the dataframe such that 'model' contains any of the regex patterns
|
222 |
data = dataframe[dataframe["Model"].str.contains(combined_regex, case=False, na=False)]
|
223 |
|
224 |
-
# replace column '' with count/rank
|
225 |
-
data[''] = np.arange(1, 1 + len(data))
|
226 |
-
|
227 |
# if update the score to not use prior sets, do so
|
228 |
if update_scores:
|
229 |
data["Score"] = (data["Chat"] + data["Chat Hard"] + data["Safety"] + data["Reasoning"]) / 4
|
@@ -231,6 +228,9 @@ def regex_table(dataframe, regex, filter_button):
|
|
231 |
# sort array by Score column
|
232 |
data = data.sort_values(by='Score', ascending=False)
|
233 |
|
|
|
|
|
|
|
234 |
# if Score exists, round to 2 decimals
|
235 |
if "Score" in data.columns:
|
236 |
data["Score"] = np.round(np.array(data["Score"].values).astype(float), 2)
|
|
|
221 |
# Filter the dataframe such that 'model' contains any of the regex patterns
|
222 |
data = dataframe[dataframe["Model"].str.contains(combined_regex, case=False, na=False)]
|
223 |
|
|
|
|
|
|
|
224 |
# if update the score to not use prior sets, do so
|
225 |
if update_scores:
|
226 |
data["Score"] = (data["Chat"] + data["Chat Hard"] + data["Safety"] + data["Reasoning"]) / 4
|
|
|
228 |
# sort array by Score column
|
229 |
data = data.sort_values(by='Score', ascending=False)
|
230 |
|
231 |
+
# replace column '' with count/rank
|
232 |
+
data[''] = np.arange(1, 1 + len(data))
|
233 |
+
|
234 |
# if Score exists, round to 2 decimals
|
235 |
if "Score" in data.columns:
|
236 |
data["Score"] = np.round(np.array(data["Score"].values).astype(float), 2)
|