Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -734,7 +734,7 @@ def translate(txt,to_lang="en",from_lang=False):
|
|
734 |
if len(chunk) > 490:
|
735 |
_words = chunk.split()
|
736 |
words = [_words[-1], *words]
|
737 |
-
chunk = _words[:-1]
|
738 |
translation = translation + " " + translator.translate(chunk)
|
739 |
else:
|
740 |
translation = translator.translate(txt)
|
|
|
734 |
if len(chunk) > 490:
|
735 |
_words = chunk.split()
|
736 |
words = [_words[-1], *words]
|
737 |
+
chunk = " ".join(_words[:-1])
|
738 |
translation = translation + " " + translator.translate(chunk)
|
739 |
else:
|
740 |
translation = translator.translate(txt)
|