Manjushri commited on
Commit
b973bfd
1 Parent(s): ede861b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,8 +10,8 @@ attention_mask = {'pad_token_id':1,
10
  def chat(Prompt):
11
  #input_ids = tokenizer(Prompt, return_tensors="pt").input_ids
12
  generated_ids = model.generate(Prompt, max_length=128)
13
- #bot = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
14
- return generated_ids
15
 
16
 
17
  gr.Interface(fn=chat, inputs='text', outputs='text').launch(debug=True)
 
10
  def chat(Prompt):
11
  #input_ids = tokenizer(Prompt, return_tensors="pt").input_ids
12
  generated_ids = model.generate(Prompt, max_length=128)
13
+ bot = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
14
+ return bot
15
 
16
 
17
  gr.Interface(fn=chat, inputs='text', outputs='text').launch(debug=True)