Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,14 +13,14 @@ def format_prompt(message, history):
|
|
13 |
prompt_prefix = "Please correct the grammar in the following sentence:"
|
14 |
prompt_template = "[INST] " + prompt_prefix + " {} [/INST]"
|
15 |
|
16 |
-
history.append("It is my friends house in England.", "It is my friend's house in England.")
|
17 |
-
history.append("Every girl must bring their books to school.", "Every girl must bring her books to school.")
|
18 |
|
19 |
# Iterates through every past user input and response to be added to the prompt
|
20 |
for user_prompt, bot_response in history:
|
21 |
prompt += prompt_template.format(user_prompt)
|
22 |
prompt += f" {bot_response}</s> "
|
23 |
-
|
24 |
|
25 |
prompt += prompt_template.format(message)
|
26 |
print("\nPROMPT: \n\t" + prompt)
|
|
|
13 |
prompt_prefix = "Please correct the grammar in the following sentence:"
|
14 |
prompt_template = "[INST] " + prompt_prefix + " {} [/INST]"
|
15 |
|
16 |
+
#history.append("It is my friends house in England.", "It is my friend's house in England.")
|
17 |
+
#history.append("Every girl must bring their books to school.", "Every girl must bring her books to school.")
|
18 |
|
19 |
# Iterates through every past user input and response to be added to the prompt
|
20 |
for user_prompt, bot_response in history:
|
21 |
prompt += prompt_template.format(user_prompt)
|
22 |
prompt += f" {bot_response}</s> "
|
23 |
+
|
24 |
|
25 |
prompt += prompt_template.format(message)
|
26 |
print("\nPROMPT: \n\t" + prompt)
|