antomtnez commited on
Commit
f4057fb
·
verified ·
1 Parent(s): bbf37d0

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def traductor(text):
4
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-es-en")
5
+ return pipe(text)[0]['translation-text']
6
+
7
+ demo = gr.Interface(fn=saluda, inputs="text", outputs="text")
8
+ demo.launch(share=True)