Spaces:
Runtime error
Runtime error
| import sentencepiece | |
| from transformers import pipeline | |
| translator = pipeline("translation",model="Helsinki-NLP/opus-mt-fr-en") | |
| import gradio as gr | |
| def translation (text): | |
| traduction = translator(text) | |
| return traduction[0]["translation_text"] | |
| demo = gr.Interface(translation, title= "TRADUCTION", inputs = "text", outputs = "text", description = "Traduisons ce texte du français vers l'anglais ! Allons y") | |
| demo.launch(quiet = True) | |