rasyosef commited on
Commit
55140de
1 Parent(s): 04bc362

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ def generate(message, chat_history, max_new_tokens):
34
  final_prompt += "User: " + message + "\n"
35
  final_prompt += "Output:"
36
 
37
- if len(tokenizer.tokenize(final_prompt)) >= 512 - max_new_tokens:
38
  final_prompt = "Instruction: Say 'Input exceeded context size, please clear the chat history and retry!' Output:"
39
 
40
  # Streamer
 
34
  final_prompt += "User: " + message + "\n"
35
  final_prompt += "Output:"
36
 
37
+ if len(tokenizer.tokenize(final_prompt)) >= 512:
38
  final_prompt = "Instruction: Say 'Input exceeded context size, please clear the chat history and retry!' Output:"
39
 
40
  # Streamer