lvwerra HF staff commited on
Commit
e0df5b6
·
verified ·
1 Parent(s): 6d80856

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -1
utils.py CHANGED
@@ -207,6 +207,7 @@ def update_notebook_display(notebook_data):
207
  return notebook_body
208
 
209
  def run_interactive_notebook(client, model, tokenizer, messages, sbx, max_new_tokens=512):
 
210
  notebook_data, code_cell_counter = create_base_notebook(messages)
211
  try:
212
  input_tokens = tokenizer.apply_chat_template(
@@ -267,7 +268,9 @@ def run_interactive_notebook(client, model, tokenizer, messages, sbx, max_new_to
267
  if i%16 == 0:
268
  yield update_notebook_display(notebook_data), messages
269
  yield update_notebook_display(notebook_data), messages
270
-
 
 
271
  # Handle code execution
272
  if code_cell:
273
  notebook_data["cells"][-1]["execution_count"] = code_cell_counter
 
207
  return notebook_body
208
 
209
  def run_interactive_notebook(client, model, tokenizer, messages, sbx, max_new_tokens=512):
210
+ print("Start!")
211
  notebook_data, code_cell_counter = create_base_notebook(messages)
212
  try:
213
  input_tokens = tokenizer.apply_chat_template(
 
268
  if i%16 == 0:
269
  yield update_notebook_display(notebook_data), messages
270
  yield update_notebook_display(notebook_data), messages
271
+
272
+
273
+ print(f"last_tokens: {'|'.join(tokens[-1])}")
274
  # Handle code execution
275
  if code_cell:
276
  notebook_data["cells"][-1]["execution_count"] = code_cell_counter