Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,9 @@ def calculate_selected_score(df, selected_columns):
|
|
86 |
return selected_quality_score
|
87 |
# print(selected_semantic_score,selected_quality_score )
|
88 |
selected_score = (selected_quality_score * QUALITY_WEIGHT + selected_semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
|
89 |
-
|
|
|
|
|
90 |
|
91 |
def get_final_score(df, selected_columns):
|
92 |
normalize_df = get_normalized_df(df)
|
|
|
86 |
return selected_quality_score
|
87 |
# print(selected_semantic_score,selected_quality_score )
|
88 |
selected_score = (selected_quality_score * QUALITY_WEIGHT + selected_semantic_score * SEMANTIC_WEIGHT) / (QUALITY_WEIGHT + SEMANTIC_WEIGHT)
|
89 |
+
if selected_score.isna().any().any():
|
90 |
+
selected_score = [0.0 for _ in range(len(selected_score))]
|
91 |
+
return selected_score
|
92 |
|
93 |
def get_final_score(df, selected_columns):
|
94 |
normalize_df = get_normalized_df(df)
|