Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,9 @@ LINEBREAK_TOKEN = 64
|
|
26 |
|
27 |
|
28 |
ROLE_TOKENS = {
|
29 |
-
"User": USER_TOKEN
|
30 |
-
"Assistant": BOT_TOKEN
|
31 |
-
"system": SYSTEM_TOKEN
|
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]
|