diff --git a/onmt/translate/translation_server.py b/onmt/translate/translation_server.py index 6dbb269153..67b52f59f0 100644 --- a/onmt/translate/translation_server.py +++ b/onmt/translate/translation_server.py @@ -596,7 +596,7 @@ def run(self, inputs): if len(examples) > 0: try: if isinstance(self.translator, CTranslate2Translator): - scores, predictions = self.translator.translate(examples) + scores, predictions = self.translator.translate(examples, tgt=[item["tgt"]["tgt"] if item["tgt"] is not None else "" for item in examples]) else: device_id = ( self.translator._dev.index if self.translator._use_cuda else -1