Spaces:
Running
Running
smol fixes
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ E2B_API_KEY = os.environ["E2B_API_KEY"]
|
|
27 |
HF_TOKEN = os.environ["HF_TOKEN"] #HfFolder.get_token() #
|
28 |
DEFAULT_MAX_TOKENS = 512
|
29 |
SANDBOXES = {}
|
30 |
-
SANDBOX_TIMEOUT =
|
31 |
TMP_DIR = './tmp/'
|
32 |
if not os.path.exists(TMP_DIR):
|
33 |
os.makedirs(TMP_DIR)
|
@@ -37,7 +37,10 @@ with open(TMP_DIR+"jupyter-agent.ipynb", 'w', encoding='utf-8') as f:
|
|
37 |
|
38 |
with open("ds-system-prompt.txt", "r") as f:
|
39 |
DEFAULT_SYSTEM_PROMPT = f.read()
|
40 |
-
DEFAULT_SYSTEM_PROMPT =
|
|
|
|
|
|
|
41 |
|
42 |
def execute_jupyter_agent(
|
43 |
sytem_prompt, user_input, max_new_tokens, model, files, message_history, request: gr.Request
|
|
|
27 |
HF_TOKEN = os.environ["HF_TOKEN"] #HfFolder.get_token() #
|
28 |
DEFAULT_MAX_TOKENS = 512
|
29 |
SANDBOXES = {}
|
30 |
+
SANDBOX_TIMEOUT = 300
|
31 |
TMP_DIR = './tmp/'
|
32 |
if not os.path.exists(TMP_DIR):
|
33 |
os.makedirs(TMP_DIR)
|
|
|
37 |
|
38 |
with open("ds-system-prompt.txt", "r") as f:
|
39 |
DEFAULT_SYSTEM_PROMPT = f.read()
|
40 |
+
DEFAULT_SYSTEM_PROMPT = """You are a coding agent with access to a Jupyter Kernel.\
|
41 |
+
The following files are available:
|
42 |
+
{}
|
43 |
+
"""
|
44 |
|
45 |
def execute_jupyter_agent(
|
46 |
sytem_prompt, user_input, max_new_tokens, model, files, message_history, request: gr.Request
|