teaevo commited on
Commit
56352a2
·
1 Parent(s): 1755376

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,8 +57,8 @@ def predict(input, history=[]):
57
  history = model.generate(bot_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id).tolist()
58
 
59
  # convert the tokens to text, and then split the responses into the right format
60
- response = tokenizer.decode(history[0]).split("<|endoftext|>") + sql_response
61
- response = [(response[i], response[i + 1]) for i in range(0, len(response) - 1, 2)] # convert to tuples of list
62
  return response, history
63
 
64
 
 
57
  history = model.generate(bot_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id).tolist()
58
 
59
  # convert the tokens to text, and then split the responses into the right format
60
+ response = tokenizer.decode(history[0]).split("<|endoftext|>")
61
+ response = sql_response + " " + [(response[i], response[i + 1]) for i in range(0, len(response) - 1, 2)] # convert to tuples of list
62
  return response, history
63
 
64