FredZhang7 commited on
Commit
2ea6700
1 Parent(s): c470f73
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -130,7 +130,8 @@ def generator(
130
  ) # stop generation whenever you see any token here
131
 
132
  instruction = re.sub(r"\n{2,}", "\n", instruction).strip().replace("\r\n", "\n")
133
- input = re.sub(r"\n{2,}", "\n", input).strip().replace("\r\n", "\n")
 
134
  ctx = generate_prompt(instruction, input, history)
135
  print(ctx + "\n")
136
 
 
130
  ) # stop generation whenever you see any token here
131
 
132
  instruction = re.sub(r"\n{2,}", "\n", instruction).strip().replace("\r\n", "\n")
133
+ if input is not None:
134
+ input = re.sub(r"\n{2,}", "\n", input).strip().replace("\r\n", "\n")
135
  ctx = generate_prompt(instruction, input, history)
136
  print(ctx + "\n")
137