Cran-May commited on
Commit
f476afd
1 Parent(s): 7c2a1e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -26,9 +26,9 @@ LINEBREAK_TOKEN = 64
26
 
27
 
28
  ROLE_TOKENS = {
29
- "User": USER_TOKEN,\n,
30
- "Assistant": BOT_TOKEN,\n,
31
- "system": SYSTEM_TOKEN,\n
32
  }
33
 
34
 
@@ -81,7 +81,7 @@ def Assistant(
81
  tokens.extend(message_tokens)
82
 
83
  last_user_message = history[-1][0]
84
- message_tokens = get_message_tokens(model=model, role="User", content=last_User_message)
85
  tokens.extend(message_tokens)
86
 
87
  role_tokens = [model.token_bos(), BOT_TOKEN, LINEBREAK_TOKEN]
 
26
 
27
 
28
  ROLE_TOKENS = {
29
+ "User": USER_TOKEN,
30
+ "Assistant": BOT_TOKEN,
31
+ "system": SYSTEM_TOKEN
32
  }
33
 
34
 
 
81
  tokens.extend(message_tokens)
82
 
83
  last_user_message = history[-1][0]
84
+ message_tokens = get_message_tokens(model=model, role="User", content=last_User_message,)
85
  tokens.extend(message_tokens)
86
 
87
  role_tokens = [model.token_bos(), BOT_TOKEN, LINEBREAK_TOKEN]