injilashah commited on
Commit
31328f6
·
verified ·
1 Parent(s): a740fc3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def Sentence_Commpletion(model_name, input):
23
  tokenizer, model = g_tokenizer, g_model
24
  inputs= tokenizer(input, return_tensors="pt")
25
  outputs = model.generate(inputs.input_ids, max_new_tokens=32)
26
- return tokenizer.decode(outputs[0])
27
 
28
 
29
  interface = gr.Interface(
 
23
  tokenizer, model = g_tokenizer, g_model
24
  inputs= tokenizer(input, return_tensors="pt")
25
  outputs = model.generate(inputs.input_ids, max_new_tokens=32)
26
+ return tokenizer.decode(outputs[0],skip_special_tokens=True)
27
 
28
 
29
  interface = gr.Interface(