Chris4K commited on
Commit
7af0a2d
·
verified ·
1 Parent(s): f395287

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -112,7 +112,7 @@ def chat_with_model(user_input, chat_history=[]):
112
  # response = tokenizer.decode(outputs[0], skip_special_tokens=True)
113
 
114
  # Decode and clean the response to remove unwanted repetitions of "assistant"
115
- response = self.tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True).strip()
116
 
117
  # Remove potential repeated assistant text
118
  response = response.replace("<|assistant|>", "").strip()
 
112
  # response = tokenizer.decode(outputs[0], skip_special_tokens=True)
113
 
114
  # Decode and clean the response to remove unwanted repetitions of "assistant"
115
+ response = tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True).strip()
116
 
117
  # Remove potential repeated assistant text
118
  response = response.replace("<|assistant|>", "").strip()