FredZhang7
commited on
Commit
•
2ea6700
1
Parent(s):
c470f73
fix old
Browse files
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
|
|
|
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 |
|