Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,8 @@ def set_default_target():
|
|
79 |
|
80 |
def translate(source, source_language, target_language):
|
81 |
if source_language == target_language:
|
82 |
-
|
|
|
83 |
|
84 |
source = [s.strip() for s in source.split('\n')]
|
85 |
source_subwords = tokenizer(source).input_ids
|
|
|
79 |
|
80 |
def translate(source, source_language, target_language):
|
81 |
if source_language == target_language:
|
82 |
+
yield source.strip()
|
83 |
+
return source.strip()
|
84 |
|
85 |
source = [s.strip() for s in source.split('\n')]
|
86 |
source_subwords = tokenizer(source).input_ids
|