Spaces:
Runtime error
Runtime error
Commit
·
99f9a4a
1
Parent(s):
5e9c7fb
加上擋住翻譯錯誤的判斷
Browse files
app.py
CHANGED
|
@@ -45,7 +45,8 @@ def translate_zh2en(text):
|
|
| 45 |
result = zh2en_tokenizer.batch_decode(sequences, skip_special_tokens=True)[0]
|
| 46 |
|
| 47 |
result = result.strip()
|
| 48 |
-
|
|
|
|
| 49 |
return result
|
| 50 |
|
| 51 |
|
|
|
|
| 45 |
result = zh2en_tokenizer.batch_decode(sequences, skip_special_tokens=True)[0]
|
| 46 |
|
| 47 |
result = result.strip()
|
| 48 |
+
if result != "No,no," :
|
| 49 |
+
result = text
|
| 50 |
return result
|
| 51 |
|
| 52 |
|