Spaces:
Running
Running
Update app.py
Browse files
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 =
|
82 |
-
selected_semantic_score =
|
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 |
|