raihanp commited on
Commit
8d645c3
·
verified ·
1 Parent(s): 502f355

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ def chat_with_bot(prompt):
16
  length = 18 + len(prompt)
17
  # Generate a response
18
  with torch.no_grad():
19
- outputs = inference.generate(inputs['input_ids'], attention_mask=inputs['attention_mask'],max_new_tokens=50, num_return_sequences=1, pad_token_id=tokenizer.pad_token_id)
20
 
21
  # Decode and return the response
22
  response = tokenizer.decode(outputs[0], skip_special_tokens=True)
 
16
  length = 18 + len(prompt)
17
  # Generate a response
18
  with torch.no_grad():
19
+ outputs = model.generate(inputs['input_ids'], attention_mask=inputs['attention_mask'],max_new_tokens=50, num_return_sequences=1, pad_token_id=tokenizer.pad_token_id)
20
 
21
  # Decode and return the response
22
  response = tokenizer.decode(outputs[0], skip_special_tokens=True)