Milad Alshomary commited on
Commit
a721fcf
·
1 Parent(s): 0f2fc55
Files changed (1) hide show
  1. baseline_static_explanations.py +2 -1
baseline_static_explanations.py CHANGED
@@ -100,7 +100,8 @@ def generate_explanations(args):
100
  style_descirption, a2_embeddings = find_closest_cluster_style(instance['a2_fullText'], interp_space, model_name=model_name)
101
  json_obj['a2_top_style_feats'] = style_descirption
102
 
103
-
 
104
  # Compute pairwise similarity between q_embeddings and all a_embeddings
105
  # Ensure embeddings are 2D arrays for cosine_similarity
106
  q_emb_2d = np.array(q_embeddings).reshape(1, -1)
 
100
  style_descirption, a2_embeddings = find_closest_cluster_style(instance['a2_fullText'], interp_space, model_name=model_name)
101
  json_obj['a2_top_style_feats'] = style_descirption
102
 
103
+ json_obj['gt_idx'] = instance['gt_idx']
104
+
105
  # Compute pairwise similarity between q_embeddings and all a_embeddings
106
  # Ensure embeddings are 2D arrays for cosine_similarity
107
  q_emb_2d = np.array(q_embeddings).reshape(1, -1)