Spaces:
Running on Zero

Ruurd commited on
Commit
2798cf6
·
verified ·
1 Parent(s): b57b92e

Remove EOT from noise visualization for ease of viewing

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- # 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:
 
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: