Spaces:
Running on Zero

Ruurd commited on
Commit
09a7f62
·
verified ·
1 Parent(s): 7287d81

Visualize noising

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -256,7 +256,7 @@ def diffusion_chat(question, eot_weight, max_it, pause_length, sharpness, cluste
256
  current_tokens = ori_input_tokens[:answer_start] + noised_answer[answer_start:]
257
 
258
  # --- RED HIGHLIGHT ---
259
- decoded_tokens = tokenizer.convert_ids_to_tokens(previous_tokens[answer_start:])
260
  highlighted = []
261
  for j, tok in enumerate(decoded_tokens):
262
  tok_id = tokenizer.convert_tokens_to_ids(tok)
 
256
  current_tokens = ori_input_tokens[:answer_start] + noised_answer[answer_start:]
257
 
258
  # --- RED HIGHLIGHT ---
259
+ decoded_tokens = tokenizer.convert_ids_to_tokens(current_tokens[answer_start:])
260
  highlighted = []
261
  for j, tok in enumerate(decoded_tokens):
262
  tok_id = tokenizer.convert_tokens_to_ids(tok)