FredZhang7 commited on
Commit
1a6d22e
·
verified ·
1 Parent(s): e979c23

replace newlines with spacing

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -20,6 +20,7 @@ def generate_prompt(instruction, input=None, history=None):
20
  .replace("\r\n", "\n")
21
  .replace("\n\n", "\n")
22
  .replace("\n\n", "\n")
 
23
  )
24
  if (history is not None) and len(history) > 1:
25
  input = ""
@@ -34,6 +35,7 @@ def generate_prompt(instruction, input=None, history=None):
34
  .replace("\r\n", "\n")
35
  .replace("\n\n", "\n")
36
  .replace("\n\n", "\n")
 
37
  )
38
  return f"""Instruction: {instruction}
39
 
 
20
  .replace("\r\n", "\n")
21
  .replace("\n\n", "\n")
22
  .replace("\n\n", "\n")
23
+ .replace("\n", " ")
24
  )
25
  if (history is not None) and len(history) > 1:
26
  input = ""
 
35
  .replace("\r\n", "\n")
36
  .replace("\n\n", "\n")
37
  .replace("\n\n", "\n")
38
+ .replace("\n", " ")
39
  )
40
  return f"""Instruction: {instruction}
41