Spaces:
Sleeping
Sleeping
File size: 416 Bytes
1892cb4 |
1 2 3 4 5 6 7 8 9 10 11 |
import sentencepiece
from transformers import pipeline
import gradio as gr
translator=pipeline("translation",model='Helsinki-NLP/opus-mt-fr-en')
def Get_Translation(input_text):
texte=translator(input_text)
result= texte[0]['translation_text']
return result
iface = gr.Interface(fn=Get_Translation,title='Text Translation',inputs='text',outputs='text',description='Get translation of giving input').launch() |