FredZhang7 commited on
Commit
aa9cf14
1 Parent(s): 7677fb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -21,12 +21,12 @@ def generate_prompt(instruction, input=None, history=None):
21
  .replace("\n\n", "\n")
22
  )
23
  if (history is not None) and len(history) > 1:
24
- input = "\""
25
  for pair in history:
26
  if pair[0] is not None and pair[1] is not None and len(pair[1]) > 0:
27
  input += f"{pair[0]}\n{pair[1]}\n"
28
- input = input[:-1] + "\"\n" + f"{instruction}"
29
- instruction = "As an assistant, generate a Response to the Input."
30
  if input and len(input) > 0:
31
  input = (
32
  input.strip()
 
21
  .replace("\n\n", "\n")
22
  )
23
  if (history is not None) and len(history) > 1:
24
+ input = ""
25
  for pair in history:
26
  if pair[0] is not None and pair[1] is not None and len(pair[1]) > 0:
27
  input += f"{pair[0]}\n{pair[1]}\n"
28
+ input = input[:-1] + "\n" + f"{instruction}"
29
+ instruction = "Generate a Response using the following information."
30
  if input and len(input) > 0:
31
  input = (
32
  input.strip()