Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,25 +48,30 @@ def main():
|
|
48 |
|
49 |
with gr.TabbedInterface(
|
50 |
[
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
70 |
demo.launch()
|
71 |
|
72 |
if __name__ == "__main__":
|
|
|
48 |
|
49 |
with gr.TabbedInterface(
|
50 |
[
|
51 |
+
gr.Column(
|
52 |
+
[
|
53 |
+
gr.Markdown("## Clasificaci贸n de Noticias"),
|
54 |
+
input_texto_clasificacion,
|
55 |
+
modelo_seleccion,
|
56 |
+
boton_clasificar,
|
57 |
+
output_clasificacion,
|
58 |
+
],
|
59 |
+
label="Clasificaci贸n de Noticias"
|
60 |
+
),
|
61 |
+
gr.Column(
|
62 |
+
[
|
63 |
+
gr.Markdown("## Traducci贸n de Ingl茅s a Espa帽ol"),
|
64 |
+
input_texto_traduccion,
|
65 |
+
boton_traducir,
|
66 |
+
output_traduccion,
|
67 |
+
],
|
68 |
+
label="Traducci贸n (Ingl茅s a Espa帽ol)"
|
69 |
+
),
|
70 |
+
]
|
71 |
+
) as tabs:
|
72 |
+
boton_clasificar.click(fn=clasificar_noticia, inputs=[input_texto_clasificacion, modelo_seleccion], outputs=output_clasificacion)
|
73 |
+
boton_traducir.click(fn=traducir_texto_en_es, inputs=[input_texto_traduccion], outputs=output_traduccion)
|
74 |
+
|
75 |
demo.launch()
|
76 |
|
77 |
if __name__ == "__main__":
|