Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -728,7 +728,7 @@ def translate(txt,to_lang="en",from_lang=False):
|
|
728 |
words = txt.split()
|
729 |
while len(words) > 0:
|
730 |
chunk = ""
|
731 |
-
while len(chunk) < 490:
|
732 |
chunk = chunk + " " + words[0]
|
733 |
words = words[1:]
|
734 |
if len(chunk) > 490:
|
|
|
728 |
words = txt.split()
|
729 |
while len(words) > 0:
|
730 |
chunk = ""
|
731 |
+
while len(words) > 0 and len(chunk) < 490:
|
732 |
chunk = chunk + " " + words[0]
|
733 |
words = words[1:]
|
734 |
if len(chunk) > 490:
|