WICKED4950 commited on
Commit
8cf095c
·
verified ·
1 Parent(s): 31435fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -59,7 +59,8 @@ def raw_pred(input, model, tokenizer, max_length=1024, temperature=0.2):
59
  def respond(message, history):
60
  # Prepare input for the model
61
  give_mod = ""
62
- for chunk in history[-4:]:
 
63
  give_mod = give_mod + "<|SOH|>" + chunk[0] + "<|SOB|>" + chunk[1]
64
  give_mod = give_mod + "<|SOH|>" + message + "<|SOB|>"
65
  print(give_mod)
 
59
  def respond(message, history):
60
  # Prepare input for the model
61
  give_mod = ""
62
+ history = history[-3:]
63
+ for chunk in history:
64
  give_mod = give_mod + "<|SOH|>" + chunk[0] + "<|SOB|>" + chunk[1]
65
  give_mod = give_mod + "<|SOH|>" + message + "<|SOB|>"
66
  print(give_mod)