Provide alternative translations on click

Hi everyone,

I’m currently exploring ways to implement a dynamic text adjustment feature similar to DeepL’s functionality, where selecting alternative options for words in the generated translation adjusts the surrounding text automatically. Specifically, I’m interested in achieving this using a fine-tuned Hugging Face model.

I’d greatly appreciate any insights, tips, or guidance.
Thank you!