Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,9 +33,9 @@ with open("ds-system-prompt.txt", "r") as f:
|
|
33 |
def execute_jupyter_agent(
|
34 |
sytem_prompt, user_input, max_new_tokens, model, files, message_history, request: gr.Request
|
35 |
):
|
36 |
-
if
|
37 |
-
SANDBOXES[
|
38 |
-
sbx = SANDBOXES[
|
39 |
|
40 |
client = InferenceClient(api_key=HF_TOKEN)
|
41 |
|
|
|
33 |
def execute_jupyter_agent(
|
34 |
sytem_prompt, user_input, max_new_tokens, model, files, message_history, request: gr.Request
|
35 |
):
|
36 |
+
if request.session_hash not in SANDBOXES:
|
37 |
+
SANDBOXES[request.session_hash] = Sandbox(api_key=E2B_API_KEY)
|
38 |
+
sbx = SANDBOXES[request.session_hash]
|
39 |
|
40 |
client = InferenceClient(api_key=HF_TOKEN)
|
41 |
|