Salmaelbarbori commited on
Commit
d9fad4e
·
1 Parent(s): fe2e91a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ def translation(text):
13
  #inference
14
  inputs = tokenizer("translate to arabic : " + text, return_tensors="pt")
15
  output = model.generate(**inputs)
16
- output = tokenizer.decode(output.cpu().numpy()[0])
17
 
18
  return output
19
 
 
13
  #inference
14
  inputs = tokenizer("translate to arabic : " + text, return_tensors="pt")
15
  output = model.generate(**inputs)
16
+ output = tokenizer.decode(output.cpu().numpy()[0], skip_special_tokens=True)
17
 
18
  return output
19