import gradio as gr from transformers import pipeline pipeline = pipeline(task="translation", model="lgrobol/m2m100_418M_br_fr") def predict(text): predictions = pipeline(text, src_lang="br", tgt_lang="fr") return predictions[0]["translation_text"] gr.Interface( predict, inputs=gradio.Textbox(placeholder="Entrez un texte en Breton"), outputs=gradio.Textbox(), title="Traduction Breton-Français", ).launch()