Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,9 +72,11 @@ def _translate(text: str, src_lang: str, tgt_lang: str):
|
|
72 |
translated_chunk = tokenizer.batch_decode(
|
73 |
translated_chunk[0], skip_special_tokens=True
|
74 |
)
|
75 |
-
|
|
|
|
|
76 |
translated_sentences.append(translated_chunk)
|
77 |
-
|
78 |
translated_paragraph = " ".join(translated_sentences)
|
79 |
translated_paragraphs.append(translated_paragraph)
|
80 |
|
|
|
72 |
translated_chunk = tokenizer.batch_decode(
|
73 |
translated_chunk[0], skip_special_tokens=True
|
74 |
)
|
75 |
+
|
76 |
+
if isinstance(translated_chunk,list):
|
77 |
+
translated_chunk = "".join(translated_chunk)
|
78 |
translated_sentences.append(translated_chunk)
|
79 |
+
print("dev: ",translated_chunk)
|
80 |
translated_paragraph = " ".join(translated_sentences)
|
81 |
translated_paragraphs.append(translated_paragraph)
|
82 |
|