Skip to main content
Version: 2024.1

Hugging Face Translation Prompt

This Translation action allows for immediate, direct text translations across all configured language pairs without the need for asynchronous processes. Leveraging the Hugging Face language models, this standalone action facilitates understanding and communicating in multiple languages directly from the Copilot interface.

info

For the action to work, you need to select exactly one element. Selection of none or more than one element is currently not supported and will result in an error. This also means you can´t use the selection context with this action (e.g. Data Object Car Selection)

Configuration Options

model_endpoint: 'https://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-en-de'

Detailed Configuration Options

  • model_endpoint: Type: String. Endpoint url of the Hugging Face model to use.

Additional Information

For accurate translations, it's important to select the right model from Hugging Face. The model_endpoint must include both the input and output languages, following the pattern /models/Helsinki-NLP/opus-mt-[input_language]-[output_language].

For example, translating English to French requires the endpoint https://api-inference.huggingface.co/models/Helsinki-NLP/opus-mt-en-fr, where en is English and fr is French. This ensures the action uses a model specifically trained for your desired language pair.