ynhe commited on
Commit
04eeff6
1 Parent(s): 1659677

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- return selected_score.fillna(0.0)
 
 
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)