Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,8 +10,8 @@ def translate(sentence):
|
|
10 |
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
11 |
|
12 |
def translate_multiline(sentence):
|
13 |
-
if len(sentence.split() > 300
|
14 |
-
print('Please insert less text')
|
15 |
if '\n' in sentence:
|
16 |
lines = sentence.split('\n')
|
17 |
translated_lines = [translate(line) for line in lines if len(line) > 0]
|
|
|
10 |
return tokenizer.decode(outputs[0], skip_special_tokens=True)
|
11 |
|
12 |
def translate_multiline(sentence):
|
13 |
+
# if len(sentence.split()) > 300:
|
14 |
+
# print('Please insert less text')
|
15 |
if '\n' in sentence:
|
16 |
lines = sentence.split('\n')
|
17 |
translated_lines = [translate(line) for line in lines if len(line) > 0]
|