Spaces:
Running
Running
Update utils.py
Browse files
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
|