lvwerra HF staff commited on
Commit
0e2ac66
1 Parent(s): 1e65752

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -18
app.py CHANGED
@@ -24,24 +24,9 @@ from utils import (
24
  E2B_API_KEY = os.environ["E2B_API_KEY"]
25
  HF_TOKEN = os.environ["HF_TOKEN"]
26
  DEFAULT_MAX_TOKENS = 512
27
- DEFAULT_SYSTEM_PROMPT = """You are a code assistant with access to a ipython interpreter.
28
- You solve tasks step-by-step and rely on code execution results.
29
- Don't make any assumptions about the data but always check the format first.
30
- If you generate code in your response you always run it in the interpreter.
31
- When fix a mistake in the code always run it again.
32
-
33
- Follow these steps given a new task and dataset:
34
- 1. Read in the data and make sure you understand each files format and content by printing useful information.
35
- 2. Execute the code at this point and don't try to write a solution before looking at the execution result.
36
- 3. After exploring the format write a quick action plan to solve the task from the user.
37
- 4. Then call the ipython interpreter directly with the solution and look at the execution result.
38
- 5. If there is an issue with the code, reason about potential issues and then propose a solution and execute again the fixed code and check the result.
39
- Always run the code at each step and repeat the steps if necessary until you reach a solution.
40
-
41
- NEVER ASSUME, ALWAYS VERIFY!
42
-
43
- List of available files:
44
- {}"""
45
 
46
 
47
  def execute_jupyter_agent(
 
24
  E2B_API_KEY = os.environ["E2B_API_KEY"]
25
  HF_TOKEN = os.environ["HF_TOKEN"]
26
  DEFAULT_MAX_TOKENS = 512
27
+
28
+ with open("ds-system-prompt.txt", "r") as f:
29
+ DEFAULT_SYSTEM_PROMPT = f.read()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
 
32
  def execute_jupyter_agent(