Tonic commited on
Commit
2be2050
1 Parent(s): c013315

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -91,7 +91,7 @@ class ChatBot:
91
  input_ids = tokenizer.encode(formatted_input, return_tensors="pt", add_special_tokens=False)
92
 
93
  # Generate a response using the model
94
- response = peft_model.generate(input_ids=input_ids, max_length=900, use_cache=False, early_stopping=False, bos_token_id=peft_model.config.bos_token_id, eos_token_id=peft_model.config.eos_token_id, pad_token_id=peft_model.config.eos_token_id, temperature=0.4, do_sample=True)
95
 
96
  # Decode the generated response to text
97
  response_text = tokenizer.decode(response[0], skip_special_tokens=True)
 
91
  input_ids = tokenizer.encode(formatted_input, return_tensors="pt", add_special_tokens=False)
92
 
93
  # Generate a response using the model
94
+ response = peft_model.generate(input_ids=input_ids, max_length=500, use_cache=False, early_stopping=False, bos_token_id=peft_model.config.bos_token_id, eos_token_id=peft_model.config.eos_token_id, pad_token_id=peft_model.config.eos_token_id, temperature=0.4, do_sample=True)
95
 
96
  # Decode the generated response to text
97
  response_text = tokenizer.decode(response[0], skip_special_tokens=True)