Open AI translator

I am using English to French translator available in the Open AI playground. I tried executing it in google collab. The model is translating the input to french but the response that containing special characters is not displayed, but their respective Unicode value is returned.
eg: This is my input: “All day long they played, and in the evening they came to the Giant to bid him good-bye.”
Expected o\p: “Toute la journée, ils ont joué et le soir ils sont venus chez le Géant pour lui dire au revoir.”
Model o\p: “Toute la journ\u00e9e, ils ont jou\u00e9 et le soir ils sont venus chez le G\u00e9ant pour lui dire au revoir.”

Do I need to add anything to my code to remove this?
Thanks in advance…

Hi there,

I imagine this has to with the way your Google Colab is set up, rather than anything with the prompt or OpenAI.

That said, you could try using a library like this to decode those unicode values.

Hope that helps!

1 Like