CreitinGameplays commited on
Commit
3c554c3
·
verified ·
1 Parent(s): 22ac850

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ if torch.cuda.is_available():
30
  def generate(
31
  message: str,
32
  chat_history: list[tuple[str, str]],
33
- system_prompt: str = "You are a helpful AI assistant named ChatGPT.",
34
  max_new_tokens: int = 1024,
35
  temperature: float = 0.3,
36
  top_p: float = 0.9,
@@ -74,7 +74,7 @@ def generate(
74
  chat_interface = gr.ChatInterface(
75
  fn=generate,
76
  additional_inputs=[
77
- gr.Textbox(label="System prompt", lines=6, value="You are a helpful AI assistant named ChatGPT."),
78
  gr.Slider(
79
  label="Max new tokens",
80
  minimum=1,
 
30
  def generate(
31
  message: str,
32
  chat_history: list[tuple[str, str]],
33
+ system_prompt: str = "You are a helpful, respectful and honest AI assistant named ChatGPT. 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. If 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.",
34
  max_new_tokens: int = 1024,
35
  temperature: float = 0.3,
36
  top_p: float = 0.9,
 
74
  chat_interface = gr.ChatInterface(
75
  fn=generate,
76
  additional_inputs=[
77
+ gr.Textbox(label="System prompt", lines=6, value="You are a helpful, respectful and honest AI assistant named ChatGPT. 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. If 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."),
78
  gr.Slider(
79
  label="Max new tokens",
80
  minimum=1,