lvwerra HF Staff commited on
Commit
0f78465
·
1 Parent(s): 9aa49ac
Files changed (2) hide show
  1. app.py +3 -6
  2. utils.py +1 -1
app.py CHANGED
@@ -59,9 +59,6 @@ def execute_jupyter_agent(
59
  api_key=HF_TOKEN,
60
  )
61
 
62
- tokenizer = AutoTokenizer.from_pretrained(model)
63
- # model = "meta-llama/Llama-3.1-8B-Instruct"
64
-
65
  filenames = []
66
  if files is not None:
67
  for filepath in files:
@@ -89,7 +86,7 @@ def execute_jupyter_agent(
89
  print("history:", message_history)
90
 
91
  for notebook_html, notebook_data, messages in run_interactive_notebook(
92
- client, model, tokenizer, message_history, sbx, max_new_tokens=max_new_tokens
93
  ):
94
  message_history = messages
95
 
@@ -159,10 +156,10 @@ with gr.Blocks() as demo:
159
  )
160
 
161
  model = gr.Dropdown(
162
- value="Qwen/Qwen3-Coder-480B-A35B-Instruct",
163
  choices=[
164
  "Qwen/Qwen3-Coder-30B-A3B-Instruct",
165
- "Qwen/Qwen3-Coder-480B-A35B-Instruct",
166
  ],
167
  label="Models"
168
  )
 
59
  api_key=HF_TOKEN,
60
  )
61
 
 
 
 
62
  filenames = []
63
  if files is not None:
64
  for filepath in files:
 
86
  print("history:", message_history)
87
 
88
  for notebook_html, notebook_data, messages in run_interactive_notebook(
89
+ client, model, message_history, sbx, max_new_tokens=max_new_tokens
90
  ):
91
  message_history = messages
92
 
 
156
  )
157
 
158
  model = gr.Dropdown(
159
+ value="Qwen/Qwen3-Coder-480B-A35B-Instruct:cerebras",
160
  choices=[
161
  "Qwen/Qwen3-Coder-30B-A3B-Instruct",
162
+ "Qwen/Qwen3-Coder-480B-A35B-Instruct:cerebras",
163
  ],
164
  label="Models"
165
  )
utils.py CHANGED
@@ -82,7 +82,7 @@ def parse_exec_result_llm(execution, max_code_output=1000):
82
  return "\n".join(output)
83
 
84
 
85
- def run_interactive_notebook(client, model, tokenizer, messages, sbx, max_new_tokens=512):
86
  notebook = JupyterNotebook(messages)
87
  sbx_info = sbx.get_info()
88
  notebook.add_sandbox_countdown(sbx_info.started_at, sbx_info.end_at)
 
82
  return "\n".join(output)
83
 
84
 
85
+ def run_interactive_notebook(client, model, messages, sbx, max_new_tokens=512):
86
  notebook = JupyterNotebook(messages)
87
  sbx_info = sbx.get_info()
88
  notebook.add_sandbox_countdown(sbx_info.started_at, sbx_info.end_at)