I Am using ML package MultilingualTranslator faceing issue in giving input

Description

Input Description
The model input is json string with three keys text: the text to be translated, from_lang: Language code of the text, to_lang: Language code of the targeted text. Example: {“text” : “UN Chief says there is no military solution in Syria”, “from_lang” : “eng_Latn”, “to_lang” : “fra_Latn” }"

Output Description
The model will return translated text in targeted language: “Le chef de l’ONU dit qu’il n’y a pas de solution militaire en Syrie”

When I enter the input in the test skill {“text” : “UN Chief says there is no military solution in Syria”, “from_lang” : “eng_Latn”, “to_lang” : “fra_Latn”} it gives output

But Now what to enter in the input of the ml skills

to Get Desired out put to show

@Jay_Chaudhary

Basically the same json string is what you would enter in the input …Is there some error you are getting?

{“text” : “UN Chief says there is no military solution in Syria”, “from_lang” : “eng_Latn”, “to_lang” : “fra_Latn”}

This string can be passed to Deserialize Json acivity(under UiPath.webapi.activities) to convert the string to jobject if needed

cheers

Yes but this is not accepted by the ui path as a input it gives error

@Jay_Chaudhary

Can you show the error its throwing please

Cheers

Sure sir ,This is the input item which is given on the item
![Screenshot (259)|690x388](upload://4YWgIeXggYLoOVZcBzLuqaupOmS.png
Please tell me what input should i give to get out put
AND INPUT ITEM I HAVE GIVEN INPUT THIS
{“text” : “UN Chief says there is no military solution in Syria”, “from_lang” : “eng_Latn”, “to_lang” : “fra_Latn” }


this is the sscrenshot

Using Deserialize Json acivity(under UiPath.webapi.activities) to convert the string to jobject this leads to this error

@Jay_Chaudhary

Please use this…i see your inverted comma are wrong and also inverted comma has to be escaped

"{""text"" : ""UN Chief says there is no military solution in Syria"", ""from_lang"" : ""eng_Latn"", ""to_lang"" : ""fra_Latn""}"

Cheers

1 Like

Thank Your sir It worked very well
I have spend time on it more than 5 hours read many documentations but does not find any solution.
Thank You very much sir for help

1 Like

@Jay_Chaudhary

Happy Automation

Glad it helped you

Cheers

Sir I Need more help
Sir i want to give the varible for taking the input from the use sir can guide me for geting input from the user

@Jay_Chaudhary

Try like this

"{""text"" : """ + variable + """, ""from_lang"" : ""eng_Latn"", ""to_lang"" : ""fra_Latn""}"

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.