Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ def format_prompt(message, history):
|
|
17 |
agents =[
|
18 |
"WEB_DEV",
|
19 |
"AI_SYSTEM_PROMPT",
|
|
|
20 |
]
|
21 |
def generate(
|
22 |
prompt, history, sys_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, agent_name=agents[0],
|
@@ -26,6 +27,8 @@ def generate(
|
|
26 |
agent = prompts.WEB_DEV
|
27 |
if agent_name == "AI_SYSTEM_PROMPT":
|
28 |
agent = prompts.AI_SYSTEM_PROMPT
|
|
|
|
|
29 |
system_prompt=agent
|
30 |
temperature = float(temperature)
|
31 |
if temperature < 1e-2:
|
|
|
17 |
agents =[
|
18 |
"WEB_DEV",
|
19 |
"AI_SYSTEM_PROMPT",
|
20 |
+
"PYTHON_CODE_DEV"
|
21 |
]
|
22 |
def generate(
|
23 |
prompt, history, sys_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, agent_name=agents[0],
|
|
|
27 |
agent = prompts.WEB_DEV
|
28 |
if agent_name == "AI_SYSTEM_PROMPT":
|
29 |
agent = prompts.AI_SYSTEM_PROMPT
|
30 |
+
if agent_name == "PYTHON_CODE_DEV":
|
31 |
+
agent = prompts.PYTHON_CODE_DEV
|
32 |
system_prompt=agent
|
33 |
temperature = float(temperature)
|
34 |
if temperature < 1e-2:
|