sdung commited on
Commit
9050c05
·
verified ·
1 Parent(s): 371421b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -42,8 +42,7 @@ def generate(message, chat_history, max_new_tokens):
42
  final_prompt += "Output:"
43
 
44
  if (
45
- len(tokenizer.tokenize(final_prompt))
46
- >= tokenizer.model_max_length - max_new_tokens
47
  ):
48
  final_prompt = "Instruction: Say 'Input exceeded context size, please clear the chat history and retry!' Output:"
49
 
 
42
  final_prompt += "Output:"
43
 
44
  if (
45
+ len(tokenizer.tokenize(final_prompt)) >= tokenizer.model_max_length - max_new_tokens
 
46
  ):
47
  final_prompt = "Instruction: Say 'Input exceeded context size, please clear the chat history and retry!' Output:"
48