Fix ISO code aliasing in /translate
Some checks are pending
Build and Publish Docker Image / main (push) Waiting to run
Run tests / tests_python (3.10) (push) Waiting to run
Run tests / tests_python (3.8) (push) Waiting to run
Run tests / tests_python (3.9) (push) Waiting to run
Run tests / test_docker_build (push) Waiting to run

This commit is contained in:
Piero Toffanin 2025-04-08 11:58:20 -04:00
parent c6aee2bf97
commit 29c9f39e8f

View file

@ -692,7 +692,7 @@ def create_app(args):
candidate_langs = detect_languages(src_texts)
detected_src_lang = candidate_langs[0]
else:
detected_src_lang = {"confidence": 100.0, "language": model2iso(source_lang)}
detected_src_lang = {"confidence": 100.0, "language": source_lang}
else:
detected_src_lang = {"confidence": 0.0, "language": "en"}