Spaces:
Running
on
Zero
Running
on
Zero
Remove EOT from noise visualization for ease of viewing
Browse files
app.py
CHANGED
@@ -279,8 +279,8 @@ def diffusion_chat(question, eot_weight, mask_weight, max_it, pause_length, shar
|
|
279 |
highlighted = []
|
280 |
for j, tok in enumerate(decoded_tokens):
|
281 |
tok_id = tokenizer.convert_tokens_to_ids(tok)
|
282 |
-
|
283 |
-
|
284 |
token_str = tokenizer.convert_tokens_to_string([tok])
|
285 |
abs_idx = answer_start + j
|
286 |
if abs_idx in just_noised_indices:
|
|
|
279 |
highlighted = []
|
280 |
for j, tok in enumerate(decoded_tokens):
|
281 |
tok_id = tokenizer.convert_tokens_to_ids(tok)
|
282 |
+
if tok_id == eot_token_id:
|
283 |
+
continue
|
284 |
token_str = tokenizer.convert_tokens_to_string([tok])
|
285 |
abs_idx = answer_start + j
|
286 |
if abs_idx in just_noised_indices:
|