hysts HF staff commited on
Commit
6bc8e25
1 Parent(s): 59812f5
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -61,7 +61,7 @@ def generate(
61
  input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
62
  if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
63
  input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
64
- gr.Warning("Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
65
  input_ids = input_ids.to(model.device)
66
 
67
  streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
 
61
  input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
62
  if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
63
  input_ids = input_ids[:, -MAX_INPUT_TOKEN_LENGTH:]
64
+ gr.Warning(f"Trimmed input from conversation as it was longer than {MAX_INPUT_TOKEN_LENGTH} tokens.")
65
  input_ids = input_ids.to(model.device)
66
 
67
  streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)