dar-tau commited on
Commit
25d6129
·
verified ·
1 Parent(s): d2266c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -130,7 +130,7 @@ def run_interpretation(raw_original_prompt, raw_interpretation_prompt, max_new_t
130
  generation_texts = tokenizer.batch_decode(generated)
131
 
132
  # create GUI output
133
- important_idxs = 1 + interpreted_vectors.diff(k=0).topk(k=int(np.ceil(0.2 * len(generation_texts))), dim=0).indices
134
  progress_dummy_output = ''
135
  elem_classes = [['bubble', 'even_bubble' if i % 2 == 0 else 'odd_bubble'] +
136
  (['faded_bubble'] if i in important_idxs else []) for i in range(len(generation_texts))]
 
130
  generation_texts = tokenizer.batch_decode(generated)
131
 
132
  # create GUI output
133
+ important_idxs = 1 + interpreted_vectors.diff(dim=0).topk(k=int(np.ceil(0.2 * len(generation_texts))), dim=0).indices
134
  progress_dummy_output = ''
135
  elem_classes = [['bubble', 'even_bubble' if i % 2 == 0 else 'odd_bubble'] +
136
  (['faded_bubble'] if i in important_idxs else []) for i in range(len(generation_texts))]