dar-tau commited on
Commit
2a19f0c
·
verified ·
1 Parent(s): bb22c33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -53,7 +53,7 @@ def get_hidden_states(raw_original_prompt):
53
  hidden_states = torch.stack([h.squeeze(0).cpu().detach() for h in outputs.hidden_states], dim=0)
54
  token_btns = ([gr.Button(token, visible=True) for token in tokens]
55
  + [gr.Button('', visible=False) for _ in range(MAX_PROMPT_TOKENS - len(tokens))])
56
- return [hidden_state, *token_btns]
57
 
58
 
59
  def run_interpretation(global_state, raw_interpretation_prompt, max_new_tokens, do_sample,
 
53
  hidden_states = torch.stack([h.squeeze(0).cpu().detach() for h in outputs.hidden_states], dim=0)
54
  token_btns = ([gr.Button(token, visible=True) for token in tokens]
55
  + [gr.Button('', visible=False) for _ in range(MAX_PROMPT_TOKENS - len(tokens))])
56
+ return [hidden_states, *token_btns]
57
 
58
 
59
  def run_interpretation(global_state, raw_interpretation_prompt, max_new_tokens, do_sample,