replace newlines with spacing
Browse files
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 |
|