Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -87,7 +87,7 @@ class ChatBot:
|
|
87 |
user_input_ids = tokenizer.encode(formatted_input, return_tensors="pt")
|
88 |
|
89 |
# Generate a response using the PEFT model
|
90 |
-
response = peft_model.generate(
|
91 |
|
92 |
# Decode the generated response to text
|
93 |
response_text = tokenizer.decode(response[0], skip_special_tokens=True)
|
|
|
87 |
user_input_ids = tokenizer.encode(formatted_input, return_tensors="pt")
|
88 |
|
89 |
# Generate a response using the PEFT model
|
90 |
+
response = peft_model.generate(input_ids=user_input_ids, max_length=512, pad_token_id=tokenizer.eos_token_id)
|
91 |
|
92 |
# Decode the generated response to text
|
93 |
response_text = tokenizer.decode(response[0], skip_special_tokens=True)
|