Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def add_new_eval(
|
|
38 |
model_name = model_name_textbox
|
39 |
else:
|
40 |
model_name = revision_name_textbox
|
41 |
-
model_name_list = csv_data['Model Name']
|
42 |
name_list = [name.split(']')[0][1:] for name in model_name_list]
|
43 |
if revision_name_textbox not in name_list:
|
44 |
col = csv_data.shape[0]
|
@@ -81,7 +81,7 @@ def calculate_selected_score(df, selected_columns):
|
|
81 |
def get_final_score(df, selected_columns):
|
82 |
normalize_df = get_normalized_df(df)
|
83 |
#final_score = normalize_df.drop('name', axis=1).sum(axis=1)
|
84 |
-
for name in normalize_df.drop('Model Name', axis=1):
|
85 |
normalize_df[name] = normalize_df[name]*DIM_WEIGHT[name]
|
86 |
quality_score = normalize_df[QUALITY_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in QUALITY_LIST])
|
87 |
semantic_score = normalize_df[SEMANTIC_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in SEMANTIC_LIST ])
|
|
|
38 |
model_name = model_name_textbox
|
39 |
else:
|
40 |
model_name = revision_name_textbox
|
41 |
+
model_name_list = csv_data['Model Name (clickable)']
|
42 |
name_list = [name.split(']')[0][1:] for name in model_name_list]
|
43 |
if revision_name_textbox not in name_list:
|
44 |
col = csv_data.shape[0]
|
|
|
81 |
def get_final_score(df, selected_columns):
|
82 |
normalize_df = get_normalized_df(df)
|
83 |
#final_score = normalize_df.drop('name', axis=1).sum(axis=1)
|
84 |
+
for name in normalize_df.drop('Model Name (clickable)', axis=1):
|
85 |
normalize_df[name] = normalize_df[name]*DIM_WEIGHT[name]
|
86 |
quality_score = normalize_df[QUALITY_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in QUALITY_LIST])
|
87 |
semantic_score = normalize_df[SEMANTIC_LIST].sum(axis=1)/sum([DIM_WEIGHT[i] for i in SEMANTIC_LIST ])
|