Language Translation

Translate text seamlessly across languages using the ModelLake().translate() method. Specify the source and target language codes, input text, and model (e.g., OpenAI) for accurate and efficient translations. Example: Translate "red shirt under Rs 500" from English (en) to Malayalam (ml). Request Payload & Method

translate_request={
                  "text": [
                      "red shirt under Rs 500"
                  ],
                  "source_lang_code": "en",
                  "target_lang_code": "ml",
                  "model": "openai"
              }

text = modellake.translate(translate_request)
print("Translated Text:", text)

Example Response

Translated Text: {'translated_text': ['500 രൂപയിൽ താഴെയുള്ള ചുവന്ന ഷർട്ട്']}

Last updated