Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def chatbot_response(user_message, history=[]):
|
|
53 |
#response = sql_tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
54 |
|
55 |
# append the new user input tokens to the chat history
|
56 |
-
bot_input_ids = torch.cat([torch.LongTensor(history),
|
57 |
|
58 |
# generate a response
|
59 |
history = sql_model.generate(bot_input_ids, max_length=1000, pad_token_id=sql_tokenizer.eos_token_id).tolist()
|
|
|
53 |
#response = sql_tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
54 |
|
55 |
# append the new user input tokens to the chat history
|
56 |
+
bot_input_ids = torch.cat([torch.LongTensor(history), encoding], dim=-1)
|
57 |
|
58 |
# generate a response
|
59 |
history = sql_model.generate(bot_input_ids, max_length=1000, pad_token_id=sql_tokenizer.eos_token_id).tolist()
|