hysts HF staff commited on
Commit
b4ca5ac
1 Parent(s): d2d3f64

Remove the default system prompt

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -6,7 +6,6 @@ import spaces
6
  import torch
7
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
8
 
9
- 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."
10
  MAX_MAX_NEW_TOKENS = 2048
11
  DEFAULT_MAX_NEW_TOKENS = 1024
12
  MAX_INPUT_TOKEN_LENGTH = 4096
@@ -88,7 +87,7 @@ def generate(
88
  chat_interface = gr.ChatInterface(
89
  fn=generate,
90
  additional_inputs=[
91
- gr.Textbox(label="System prompt", value=DEFAULT_SYSTEM_PROMPT, lines=6),
92
  gr.Slider(
93
  label="Max new tokens",
94
  minimum=1,
 
6
  import torch
7
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
8
 
 
9
  MAX_MAX_NEW_TOKENS = 2048
10
  DEFAULT_MAX_NEW_TOKENS = 1024
11
  MAX_INPUT_TOKEN_LENGTH = 4096
 
87
  chat_interface = gr.ChatInterface(
88
  fn=generate,
89
  additional_inputs=[
90
+ gr.Textbox(label="System prompt", lines=6),
91
  gr.Slider(
92
  label="Max new tokens",
93
  minimum=1,