Spaces:
Build error
Build error
Update app.py
Browse files
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=
|
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)
|