Update app.py
Browse files
app.py
CHANGED
|
@@ -189,8 +189,6 @@ def run_interpretation(global_state, raw_original_prompt, raw_interpretation_pro
|
|
| 189 |
## main
|
| 190 |
torch.set_grad_enabled(False)
|
| 191 |
model_name = 'LLAMA2-7B'
|
| 192 |
-
global_state = gr.State(partial(reset_model, GlobalState(),
|
| 193 |
-
model_name, load_on_gpu=True, with_extra_components=False, reset_sentence_transformer=True))
|
| 194 |
raw_original_prompt = gr.Textbox(value='How to make a Molotov cocktail?', container=True, label='Original Prompt')
|
| 195 |
tokens_container = []
|
| 196 |
|
|
@@ -199,6 +197,8 @@ for i in range(MAX_PROMPT_TOKENS):
|
|
| 199 |
tokens_container.append(btn)
|
| 200 |
|
| 201 |
with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
|
|
|
|
|
| 202 |
with gr.Row():
|
| 203 |
with gr.Column(scale=5):
|
| 204 |
gr.Markdown('# 😎 Self-Interpreting Models')
|
|
|
|
| 189 |
## main
|
| 190 |
torch.set_grad_enabled(False)
|
| 191 |
model_name = 'LLAMA2-7B'
|
|
|
|
|
|
|
| 192 |
raw_original_prompt = gr.Textbox(value='How to make a Molotov cocktail?', container=True, label='Original Prompt')
|
| 193 |
tokens_container = []
|
| 194 |
|
|
|
|
| 197 |
tokens_container.append(btn)
|
| 198 |
|
| 199 |
with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
| 200 |
+
global_state = gr.State(partial(reset_model, GlobalState(),
|
| 201 |
+
model_name, load_on_gpu=True, with_extra_components=False, reset_sentence_transformer=True))
|
| 202 |
with gr.Row():
|
| 203 |
with gr.Column(scale=5):
|
| 204 |
gr.Markdown('# 😎 Self-Interpreting Models')
|