ynhe commited on
Commit
78d92e1
1 Parent(s): c500eaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -121,13 +121,16 @@ def get_final_score(df, selected_columns):
121
 
122
  def get_final_score_quality(df, selected_columns):
123
  normalize_df = get_normalized_df(df)
124
- quality_score = normalize_df[QUALITY_TAB].sum(axis=1) / len(QUALITY_TAB)
 
 
125
 
126
  if 'Quality Score' in df:
127
  df['Quality Score'] = quality_score
128
  else:
129
  df.insert(1, 'Quality Score', quality_score)
130
- selected_score = normalize_df[selected_columns].sum(axis=1) / len(selected_columns)
 
131
  if 'Selected Score' in df:
132
  df['Selected Score'] = selected_score
133
  else:
 
121
 
122
  def get_final_score_quality(df, selected_columns):
123
  normalize_df = get_normalized_df(df)
124
+ for name in normalize_df.drop('Model Name (clickable)', axis=1):
125
+ normalize_df[name] = normalize_df[name]*DIM_WEIGHT[name]
126
+ quality_score = normalize_df[QUALITY_TAB].sum(axis=1) / sum([DIM_WEIGHT[i] for i in QUALITY_TAB])
127
 
128
  if 'Quality Score' in df:
129
  df['Quality Score'] = quality_score
130
  else:
131
  df.insert(1, 'Quality Score', quality_score)
132
+ # selected_score = normalize_df[selected_columns].sum(axis=1) / len(selected_columns)
133
+ selected_score = df[selected_columns].sum(axis=1)/sum([DIM_WEIGHT[i] for i in selected_columns])
134
  if 'Selected Score' in df:
135
  df['Selected Score'] = selected_score
136
  else: