Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def sqlquery(input, history=[]):
|
|
111 |
history = sql_model.generate(bot_input_ids, max_length=1000, pad_token_id=sql_tokenizer.eos_token_id).tolist()
|
112 |
|
113 |
# convert the tokens to text, and then split the responses into the right format
|
114 |
-
response = sql_tokenizer.
|
115 |
response = [(response[i], response[i + 1]) for i in range(0, len(response) - 1, 2)] # convert to tuples of list
|
116 |
|
117 |
'''
|
|
|
111 |
history = sql_model.generate(bot_input_ids, max_length=1000, pad_token_id=sql_tokenizer.eos_token_id).tolist()
|
112 |
|
113 |
# convert the tokens to text, and then split the responses into the right format
|
114 |
+
response = sql_tokenizer.batch_decode(history[0]).split("<|endoftext|>")
|
115 |
response = [(response[i], response[i + 1]) for i in range(0, len(response) - 1, 2)] # convert to tuples of list
|
116 |
|
117 |
'''
|