Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -442,7 +442,7 @@ def get_final_score(df, selected_columns):
|
|
| 442 |
for name in normalize_df.drop('Model Name (clickable)', axis=1).drop("Sampled by", axis=1).drop('Mail', axis=1).drop('Date',axis=1):
|
| 443 |
normalize_df[name] = normalize_df[name]*DIM_WEIGHT[name]
|
| 444 |
quality_score = normalize_df[QUALITY_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in QUALITY_LIST])
|
| 445 |
-
semantic_score = normalize_df[SEMANTIC_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in SEMANTIC_LIST
|
| 446 |
final_score = (quality_score * QUALITY_WEIGHT + semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
|
| 447 |
if 'Total Score' in df:
|
| 448 |
df['Total Score'] = final_score
|
|
@@ -658,9 +658,9 @@ def enable_all():
|
|
| 658 |
def on_filter_model_size_method_change(selected_columns, vbench_team_sample, vbench_team_eval=False):
|
| 659 |
updated_data = get_all_df(selected_columns, CSV_DIR)
|
| 660 |
if vbench_team_sample:
|
| 661 |
-
updated_data = updated_data[updated_data["Sampled by"]
|
| 662 |
if vbench_team_eval:
|
| 663 |
-
updated_data =
|
| 664 |
#print(updated_data)
|
| 665 |
# columns:
|
| 666 |
selected_columns = [item for item in TASK_INFO if item in selected_columns]
|
|
|
|
| 442 |
for name in normalize_df.drop('Model Name (clickable)', axis=1).drop("Sampled by", axis=1).drop('Mail', axis=1).drop('Date',axis=1):
|
| 443 |
normalize_df[name] = normalize_df[name]*DIM_WEIGHT[name]
|
| 444 |
quality_score = normalize_df[QUALITY_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in QUALITY_LIST])
|
| 445 |
+
semantic_score = normalize_df[SEMANTIC_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in SEMANTIC_LIST])
|
| 446 |
final_score = (quality_score * QUALITY_WEIGHT + semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
|
| 447 |
if 'Total Score' in df:
|
| 448 |
df['Total Score'] = final_score
|
|
|
|
| 658 |
def on_filter_model_size_method_change(selected_columns, vbench_team_sample, vbench_team_eval=False):
|
| 659 |
updated_data = get_all_df(selected_columns, CSV_DIR)
|
| 660 |
if vbench_team_sample:
|
| 661 |
+
updated_data = updated_data[updated_data["Sampled by"].str.contains('VBench Team')]
|
| 662 |
if vbench_team_eval:
|
| 663 |
+
updated_data = updated_data[updated_data["Evaluated by"].str.contains('VBench Team')]
|
| 664 |
#print(updated_data)
|
| 665 |
# columns:
|
| 666 |
selected_columns = [item for item in TASK_INFO if item in selected_columns]
|