ambreshrc commited on
Commit
d9d284e
1 Parent(s): df181b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ def btTranslator(docxfile):
78
  with torch.no_grad():
79
  translated_batch = model.generate(**model_inputs)
80
  translated += translated_batch
81
- translated = [tokenizer.decode(t, skip_special_tokens=False) for t in translated]
82
  translated_paragraphs += [" ".join(translated)]
83
  #files.add_paragraph(translated)
84
  translated_text = "\n".join(translated_paragraphs)
 
78
  with torch.no_grad():
79
  translated_batch = model.generate(**model_inputs)
80
  translated += translated_batch
81
+ translated = [tokenizer.decode(t, skip_special_tokens=True) for t in translated]
82
  translated_paragraphs += [" ".join(translated)]
83
  #files.add_paragraph(translated)
84
  translated_text = "\n".join(translated_paragraphs)