ynhe commited on
Commit
649782b
1 Parent(s): dcad14d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -78,8 +78,8 @@ def calculate_selected_score(df, selected_columns):
78
  # selected_score = df[selected_columns].sum(axis=1)
79
  selected_QUALITY = [i for i in selected_columns if i in QUALITY_LIST]
80
  selected_SEMANTIC = [i for i in selected_columns if i in SEMANTIC_LIST]
81
- selected_quality_score = normalize_df[selected_QUALITY].sum(axis=1)/sum([DIM_WEIGHT[i] for i in selected_QUALITY])
82
- selected_semantic_score = normalize_df[selected_SEMANTIC].sum(axis=1)/sum([DIM_WEIGHT[i] for i in selected_SEMANTIC ])
83
  selected_score = (selected_quality_score * QUALITY_WEIGHT + selected_semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
84
  return selected_score
85
 
 
78
  # selected_score = df[selected_columns].sum(axis=1)
79
  selected_QUALITY = [i for i in selected_columns if i in QUALITY_LIST]
80
  selected_SEMANTIC = [i for i in selected_columns if i in SEMANTIC_LIST]
81
+ selected_quality_score = df[selected_QUALITY].sum(axis=1)/sum([DIM_WEIGHT[i] for i in selected_QUALITY])
82
+ selected_semantic_score = df[selected_SEMANTIC].sum(axis=1)/sum([DIM_WEIGHT[i] for i in selected_SEMANTIC ])
83
  selected_score = (selected_quality_score * QUALITY_WEIGHT + selected_semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
84
  return selected_score
85