ayymen commited on
Commit
fcd0983
·
verified ·
1 Parent(s): bef4bfe

Skip special tokens

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -55,7 +55,7 @@ def translate(text, source_lang="English", target_lang="Tachelhit/Central Atlas
55
  )
56
  target = results[0].hypotheses[0][1:]
57
 
58
- translation = nllb_tokenizer.decode(nllb_tokenizer.convert_tokens_to_ids(target))
59
 
60
  translations.append(translation)
61
 
 
55
  )
56
  target = results[0].hypotheses[0][1:]
57
 
58
+ translation = nllb_tokenizer.decode(nllb_tokenizer.convert_tokens_to_ids(target), skip_special_tokens=True)
59
 
60
  translations.append(translation)
61