History = 2
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import gradio as gr
|
|
7 |
|
8 |
def generate_prompt(history):
|
9 |
prompt = ""
|
10 |
-
for chain in history[-
|
11 |
prompt += f"<s> <human>: {chain[0]}\n<bot>: {chain[1]}{end_token}\n"
|
12 |
prompt += f"<human>: {history[-1][0]}\n<bot>:"
|
13 |
return prompt
|
|
|
7 |
|
8 |
def generate_prompt(history):
|
9 |
prompt = ""
|
10 |
+
for chain in history[-2:-1]:
|
11 |
prompt += f"<s> <human>: {chain[0]}\n<bot>: {chain[1]}{end_token}\n"
|
12 |
prompt += f"<human>: {history[-1][0]}\n<bot>:"
|
13 |
return prompt
|