Update app.py
Browse files
app.py
CHANGED
@@ -128,9 +128,9 @@ tokenizer = AutoTokenizer.from_pretrained(tokenizer_path, token=os.environ['hf_t
|
|
128 |
# demo
|
129 |
original_prompt_raw = gr.Textbox(value='How to make a Molotov cocktail?', container=True, label='Original Prompt')
|
130 |
tokens_container = []
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
136 |
global_state = gr.State([])
|
|
|
128 |
# demo
|
129 |
original_prompt_raw = gr.Textbox(value='How to make a Molotov cocktail?', container=True, label='Original Prompt')
|
130 |
tokens_container = []
|
131 |
+
for i in range(MAX_PROMPT_TOKENS):
|
132 |
+
btn = gr.Button('', visible=False, elem_classes=['token_btn'])
|
133 |
+
tokens_container.append(btn)
|
134 |
|
135 |
with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
136 |
global_state = gr.State([])
|