Tonic commited on
Commit
abd9f13
·
1 Parent(s): d75ce5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ model.to(device)
18
  def generate_text(prompt):
19
  input_ids = tokenizer(prompt, return_tensors="pt").input_ids
20
  tokens = model.generate(input_ids, max_length=22)
21
- return tokenizer.decode(tokens[0].tolist(), skip_special_tokens=True)
22
 
23
  iface = gr.Interface(
24
  fn=generate_text,
 
18
  def generate_text(prompt):
19
  input_ids = tokenizer(prompt, return_tensors="pt").input_ids
20
  tokens = model.generate(input_ids, max_length=22)
21
+ return tokenizer.decode(tokens[0].tolist(), skip_special_tokens=False)
22
 
23
  iface = gr.Interface(
24
  fn=generate_text,