Make src and dst languages explicit

This commit is contained in:
oobabooga 2023-01-28 23:29:17 -03:00
parent 7ff68ef252
commit 1a8d815de4

View File

@ -12,11 +12,11 @@ def input_modifier(string):
they are fed into the model. they are fed into the model.
""" """
return translator.translate(string, dest='en').text return translator.translate(string, src=params['language string'], dest='en').text
def output_modifier(string): def output_modifier(string):
""" """
This function is applied to the model outputs. This function is applied to the model outputs.
""" """
return translator.translate(string, dest=params['language string']).text return translator.translate(string, src="en", dest=params['language string']).text