Chris STC
commited on
Commit
·
5062cba
1
Parent(s):
df98c68
Update app.py
Browse files
app.py
CHANGED
@@ -35,15 +35,15 @@ with gr.Blocks(theme=theme) as demo:
|
|
35 |
instruction = history[-1][1] or ""
|
36 |
user_message = history[-1][0]
|
37 |
|
38 |
-
token_instruction_header =
|
39 |
-
token_instruction_text =
|
40 |
|
41 |
-
token_user_header =
|
42 |
-
token_user_text =
|
43 |
|
44 |
-
token_response_header =
|
45 |
|
46 |
-
tokens =
|
47 |
|
48 |
history[-1][1] = ""
|
49 |
count = 0
|
|
|
35 |
instruction = history[-1][1] or ""
|
36 |
user_message = history[-1][0]
|
37 |
|
38 |
+
# token_instruction_header = b"### Instruction: "
|
39 |
+
# token_instruction_text = instruction.encode()
|
40 |
|
41 |
+
# token_user_header = b"\n\n### User: "
|
42 |
+
token_user_text = user_message.encode()
|
43 |
|
44 |
+
token_response_header = b"\n\n### Response:"
|
45 |
|
46 |
+
tokens = llm2.tokenize(token_user_text + token_response_header)
|
47 |
|
48 |
history[-1][1] = ""
|
49 |
count = 0
|