Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,9 +16,7 @@ def generate_text(input_text, history):
|
|
| 16 |
if history == []:
|
| 17 |
input_text_with_history = f"Q: {input_text} \n A:"
|
| 18 |
else:
|
| 19 |
-
input_text_with_history = ""
|
| 20 |
-
for i in history[-1]:
|
| 21 |
-
input_text_with_history += i[0] + "\n" + i[1]
|
| 22 |
input_text_with_history += f"Q: {input_text} \n A:"
|
| 23 |
|
| 24 |
print("new input", input_text_with_history)
|
|
|
|
| 16 |
if history == []:
|
| 17 |
input_text_with_history = f"Q: {input_text} \n A:"
|
| 18 |
else:
|
| 19 |
+
input_text_with_history = history[-1][1]+ "\n"
|
|
|
|
|
|
|
| 20 |
input_text_with_history += f"Q: {input_text} \n A:"
|
| 21 |
|
| 22 |
print("new input", input_text_with_history)
|