Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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)
|