hysts HF staff commited on
Commit
a400f4b
1 Parent(s): 89bd8c8

Remove the default system prompt

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -10,7 +10,6 @@ from transformers import (
10
  TextIteratorStreamer,
11
  )
12
 
13
- DEFAULT_SYSTEM_PROMPT = "You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
14
  MAX_MAX_NEW_TOKENS = 2048
15
  DEFAULT_MAX_NEW_TOKENS = 1024
16
  MAX_INPUT_TOKEN_LENGTH = 4096
@@ -97,7 +96,7 @@ def generate(
97
  chat_interface = gr.ChatInterface(
98
  fn=generate,
99
  additional_inputs=[
100
- gr.Textbox(label="System prompt", value=DEFAULT_SYSTEM_PROMPT, lines=6),
101
  gr.Slider(
102
  label="Max new tokens",
103
  minimum=1,
 
10
  TextIteratorStreamer,
11
  )
12
 
 
13
  MAX_MAX_NEW_TOKENS = 2048
14
  DEFAULT_MAX_NEW_TOKENS = 1024
15
  MAX_INPUT_TOKEN_LENGTH = 4096
 
96
  chat_interface = gr.ChatInterface(
97
  fn=generate,
98
  additional_inputs=[
99
+ gr.Textbox(label="System prompt", lines=6),
100
  gr.Slider(
101
  label="Max new tokens",
102
  minimum=1,