Chris STC commited on
Commit
2150067
·
1 Parent(s): 48ecc97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -30,15 +30,15 @@ with gr.Blocks(theme=theme) as demo:
30
  instruction = history[-1][1] or ""
31
  user_message = history[-1][0]
32
 
33
- # token_instruction_header = b"### Instruction: "
34
- # token_instruction_text = instruction.encode()
35
 
36
- # token_user_header = b"\n\n### User: "
37
  token_user_text = user_message.encode()
38
 
39
  token_response_header = b"\n\n### Response:"
40
 
41
- tokens = llm2.tokenize(token_user_text + token_response_header)
42
 
43
  history[-1][1] = ""
44
  count = 0
 
30
  instruction = history[-1][1] or ""
31
  user_message = history[-1][0]
32
 
33
+ token_instruction_header = b"### Instruction: "
34
+ token_instruction_text = instruction.encode()
35
 
36
+ token_user_header = b"\n\n### User: "
37
  token_user_text = user_message.encode()
38
 
39
  token_response_header = b"\n\n### Response:"
40
 
41
+ tokens = llm2.tokenize(token_instruction_header + token_instruction_text + token_user_header + token_user_text + token_response_header)
42
 
43
  history[-1][1] = ""
44
  count = 0