Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -210,15 +210,15 @@ def run_interactive_notebook(client, model, tokenizer, messages, sbx, max_new_to
|
|
210 |
print("Start!")
|
211 |
notebook_data, code_cell_counter = create_base_notebook(messages)
|
212 |
try:
|
213 |
-
input_tokens = tokenizer.apply_chat_template(
|
214 |
-
messages,
|
215 |
-
builtin_tools=["code_interpreter"],
|
216 |
-
add_generation_prompt=True
|
217 |
-
)
|
218 |
-
model_input = tokenizer.decode(input_tokens)
|
219 |
-
|
220 |
#code_cell_counter = 0
|
221 |
while True:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
response_stream = client.text_generation(
|
223 |
model=model,
|
224 |
prompt=model_input,
|
|
|
210 |
print("Start!")
|
211 |
notebook_data, code_cell_counter = create_base_notebook(messages)
|
212 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
#code_cell_counter = 0
|
214 |
while True:
|
215 |
+
input_tokens = tokenizer.apply_chat_template(
|
216 |
+
messages,
|
217 |
+
builtin_tools=["code_interpreter"],
|
218 |
+
add_generation_prompt=True
|
219 |
+
)
|
220 |
+
model_input = tokenizer.decode(input_tokens)
|
221 |
+
|
222 |
response_stream = client.text_generation(
|
223 |
model=model,
|
224 |
prompt=model_input,
|