Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ def translate(text,lang):
|
|
80 |
if trgt_lang == lang:
|
81 |
translated = trgt_text
|
82 |
except:
|
83 |
-
|
84 |
|
85 |
ret = re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translated)).lower().strip()
|
86 |
print(ret)
|
|
|
80 |
if trgt_lang == lang:
|
81 |
translated = trgt_text
|
82 |
except:
|
83 |
+
print(f'Warning: Could not translate "{text}" into {lang}!')
|
84 |
|
85 |
ret = re.sub(f'[{string.punctuation}]', '', re.sub('[\s+]', ' ', translated)).lower().strip()
|
86 |
print(ret)
|