Spaces:
Sleeping
Sleeping
Update classification.py
Browse files178 unmodified lines179180181182183184185178 unmodified linescos_scores = util.cos_sim(ebd_content, torch.stack(list(category_df['Embeddings']), dim=0))[0]high_score_indices = [i for i, score in enumerate(cos_scores) if score > treshold]categories_list.append("@~@".join([category_df.loc[index, 'description'] for index in high_score_indices]))experts_list.append("@~@".join(", ".join([category_df.loc[index, 'experts']) for index in high_score_indices]))topic_list.append("@~@".join([category_df.loc[index, 'topic'] for index in high_score_indices]))scores_list.append("@~@".join([float(cos_scores[index]) for index in high_score_indices]))for j in high_score_indices:178 unmodified lines179180181182183184185178 unmodified linescos_scores = util.cos_sim(ebd_content, torch.stack(list(category_df['Embeddings']), dim=0))[0]high_score_indices = [i for i, score in enumerate(cos_scores) if score > treshold]categories_list.append("@~@".join([category_df.loc[index, 'description'] for index in high_score_indices]))experts_list.append("@~@".join([", ".join(category_df.loc[index, 'experts']) for index in high_score_indices]))topic_list.append("@~@".join([category_df.loc[index, 'topic'] for index in high_score_indices]))scores_list.append("@~@".join([float(cos_scores[index]) for index in high_score_indices]))for j in high_score_indices:
classification.py+1-1