ColeGuion commited on
Commit
4039663
·
verified ·
1 Parent(s): 716b126

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -31,14 +31,15 @@ def format_prompt(message, history):
31
  prompt = "<s>"
32
 
33
  # String to add before every prompt
34
- #prompt_prefix = "Please correct the grammar in the following sentence:"
35
- #prompt_template = "[INST] " + prompt_prefix + " {} [/INST]"
36
  prompt_prefix = "Correct any grammatical errors in the following sentence and provide the corrected version:\n\nSentence: "
37
  prompt_template = "[INST] " + prompt_prefix + ' "{}" [/INST] Corrected Sentence:'
38
 
39
  print("History Type: {}".format(type(history)))
 
40
  if type(history) != type(list()):
41
  print("\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\n")
 
 
42
  #history.append("It is my friends house in England.", "It is my friend's house in England.")
43
  #history.append("Every girl must bring their books to school.", "Every girl must bring her books to school.")
44
 
 
31
  prompt = "<s>"
32
 
33
  # String to add before every prompt
 
 
34
  prompt_prefix = "Correct any grammatical errors in the following sentence and provide the corrected version:\n\nSentence: "
35
  prompt_template = "[INST] " + prompt_prefix + ' "{}" [/INST] Corrected Sentence:'
36
 
37
  print("History Type: {}".format(type(history)))
38
+ print("History: {}".format(history))
39
  if type(history) != type(list()):
40
  print("\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\n")
41
+ #else:
42
+ # myList = ["It is my friends house in England.", "It is my friend's house in England."]
43
  #history.append("It is my friends house in England.", "It is my friend's house in England.")
44
  #history.append("Every girl must bring their books to school.", "Every girl must bring her books to school.")
45