Update app.py
Browse files
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 [
|
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,
|