Upload 2 files
Browse files
app.py
CHANGED
|
@@ -5,7 +5,9 @@ import gradio as gr
|
|
| 5 |
from transformers import pipeline
|
| 6 |
|
| 7 |
# Cargar el modelo
|
|
|
|
| 8 |
model = pipeline("translation", model="projecte-aina/aina-translator-es-ast")
|
|
|
|
| 9 |
|
| 10 |
# Funci贸n para traducir
|
| 11 |
def translate(text):
|
|
@@ -18,5 +20,5 @@ interface = gr.Interface(
|
|
| 18 |
outputs=gr.Textbox(label="Traducci贸n al asturiano")
|
| 19 |
)
|
| 20 |
|
| 21 |
-
|
| 22 |
-
interface.launch()
|
|
|
|
| 5 |
from transformers import pipeline
|
| 6 |
|
| 7 |
# Cargar el modelo
|
| 8 |
+
print("Cargando el modelo...")
|
| 9 |
model = pipeline("translation", model="projecte-aina/aina-translator-es-ast")
|
| 10 |
+
print("Modelo cargado con 茅xito.")
|
| 11 |
|
| 12 |
# Funci贸n para traducir
|
| 13 |
def translate(text):
|
|
|
|
| 20 |
outputs=gr.Textbox(label="Traducci贸n al asturiano")
|
| 21 |
)
|
| 22 |
|
| 23 |
+
print("Lanzando Gradio...")
|
| 24 |
+
interface.launch(debug=True)
|