Yaron Koresh commited on
Commit
ee47803
·
verified ·
1 Parent(s): 34de90e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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)