Spaces:
Sleeping
Sleeping
Update classification.py
Browse files- classification.py +1 -1
classification.py
CHANGED
@@ -181,7 +181,7 @@ def match_categories(df, category_df, treshold=0.45):
|
|
181 |
categories_list.append("@~@".join([category_df.loc[index, 'description'] for index in high_score_indices]))
|
182 |
experts_list.append("@~@".join(["@~@".join(list(set(category_df.loc[index, 'experts']))) for index in high_score_indices]))
|
183 |
topic_list.append("@~@".join([category_df.loc[index, 'topic'] for index in high_score_indices]))
|
184 |
-
scores_list.append("@~@".join(["@~@".join(float(cos_scores[index]) for index in high_score_indices]))
|
185 |
for j in high_score_indices:
|
186 |
df.loc[index, category_df.loc[j, 'topic']] = float(cos_scores[j])
|
187 |
else:
|
|
|
181 |
categories_list.append("@~@".join([category_df.loc[index, 'description'] for index in high_score_indices]))
|
182 |
experts_list.append("@~@".join(["@~@".join(list(set(category_df.loc[index, 'experts']))) for index in high_score_indices]))
|
183 |
topic_list.append("@~@".join([category_df.loc[index, 'topic'] for index in high_score_indices]))
|
184 |
+
scores_list.append("@~@".join(["@~@".join(float(cos_scores[index]) for index in high_score_indices)]))
|
185 |
for j in high_score_indices:
|
186 |
df.loc[index, category_df.loc[j, 'topic']] = float(cos_scores[j])
|
187 |
else:
|