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