f4057fb 854a441 f4057fb
1
2
3
4
5
6
7
8
import gradio as gr def traductor(text): pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-es-en") return pipe(text)[0]['translation-text'] demo = gr.Interface(fn=traductor, inputs="text", outputs="text") demo.launch(share=True)