lvwerra HF staff commited on
Commit
556491b
·
verified ·
1 Parent(s): 5c9a3e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -31,7 +31,7 @@ with open("ds-system-prompt.txt", "r") as f:
31
 
32
 
33
  def execute_jupyter_agent(
34
- sytem_prompt, user_input, max_new_tokens, model, files, message_history, request
35
  ):
36
  if reqest.session_hash not in SANDBOXES:
37
  SANDBOXES[reqest.session_hash] = Sandbox(api_key=E2B_API_KEY)
@@ -95,7 +95,6 @@ css = """
95
  # Create the interface
96
  with gr.Blocks() as demo:
97
  msg_state = gr.State(value=[])
98
- req = gr.Request()
99
 
100
  html_output = gr.HTML(value=update_notebook_display(create_base_notebook([])[0]))
101
 
@@ -138,7 +137,7 @@ with gr.Blocks() as demo:
138
 
139
  generate_btn.click(
140
  fn=execute_jupyter_agent,
141
- inputs=[system_input, user_input, max_tokens, model, files, msg_state, req],
142
  outputs=[html_output, msg_state],
143
  )
144
 
 
31
 
32
 
33
  def execute_jupyter_agent(
34
+ sytem_prompt, user_input, max_new_tokens, model, files, message_history, request: gr.Request
35
  ):
36
  if reqest.session_hash not in SANDBOXES:
37
  SANDBOXES[reqest.session_hash] = Sandbox(api_key=E2B_API_KEY)
 
95
  # Create the interface
96
  with gr.Blocks() as demo:
97
  msg_state = gr.State(value=[])
 
98
 
99
  html_output = gr.HTML(value=update_notebook_display(create_base_notebook([])[0]))
100
 
 
137
 
138
  generate_btn.click(
139
  fn=execute_jupyter_agent,
140
+ inputs=[system_input, user_input, max_tokens, model, files, msg_state],
141
  outputs=[html_output, msg_state],
142
  )
143