Update utils.py

This commit is contained in:
bfsujason
2022-10-02 11:50:26 +08:00
committed by GitHub
parent 56bbbd5dd4
commit a60625df13

View File

@@ -15,7 +15,7 @@ def clean_text(text):
def detect_lang(text):
translator = Translator(service_urls=[
'translate.google.cn',
'translate.google.com.hk',
])
max_len = 200
chunk = text[0 : min(max_len, len(text))]