ybelkada commited on
Commit
e86b69f
1 Parent(s): 74ea6ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,8 +45,8 @@ def has_no_history(chatbot, history):
45
  return not chatbot and not history
46
 
47
 
48
- header = "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. "
49
- prompt_template = "### Human: {query} ### Assistant:{response}"
50
 
51
  def generate(
52
  user_message,
@@ -78,7 +78,7 @@ def generate(
78
  for i in range(0, len(past_messages), 2):
79
  intermediate_prompt = prompt_template.format(query=past_messages[i]["content"], response=past_messages[i+1]["content"])
80
  print("intermediate: ", intermediate_prompt)
81
- prompt = prompt + intermediate_prompt
82
 
83
  prompt = prompt + prompt_template.format(query=user_message, response="")
84
 
 
45
  return not chatbot and not history
46
 
47
 
48
+ header = "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions."
49
+ prompt_template = "### Human: {query}\n ### Assistant:{response}"
50
 
51
  def generate(
52
  user_message,
 
78
  for i in range(0, len(past_messages), 2):
79
  intermediate_prompt = prompt_template.format(query=past_messages[i]["content"], response=past_messages[i+1]["content"])
80
  print("intermediate: ", intermediate_prompt)
81
+ prompt = prompt + '\n' + intermediate_prompt
82
 
83
  prompt = prompt + prompt_template.format(query=user_message, response="")
84