Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| def traduce(Frase): | |
| pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-ca") | |
| frase_ca = pipe(Frase) | |
| return frase_ca[0]['translation_text'] | |
| demo = gr.Interface(fn=traduce, inputs="text", outputs="text") | |
| demo.launch(share=True) |