Update app.py
Browse files
app.py
CHANGED
|
@@ -29,11 +29,18 @@ def traducir(texto):
|
|
| 29 |
return texto_completo
|
| 30 |
|
| 31 |
with gr.Blocks() as demo:
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
sumbtn.click(fn = traducir_resumir, inputs = text, outputs = output1)
|
| 38 |
tradbtn.click(fn = traducir, inputs = text, outputs = output2)
|
| 39 |
# demo = gr.Interface(
|
|
|
|
| 29 |
return texto_completo
|
| 30 |
|
| 31 |
with gr.Blocks() as demo:
|
| 32 |
+
with gr.Row():
|
| 33 |
+
with gr.Column():
|
| 34 |
+
text = gr.Textbox(label="Introduzca el texto a resumir y traducir")
|
| 35 |
+
with gr.Row():
|
| 36 |
+
with gr.Coulmn():
|
| 37 |
+
sumbtn = gr.Button("Resumir y traducir")
|
| 38 |
+
with gr.Column():
|
| 39 |
+
tradbtn = gr.Button("Traducir texto")
|
| 40 |
+
with gr.Column():
|
| 41 |
+
output1 = gr.Textbox(label="Texto resumido traducido")
|
| 42 |
+
output2 = gr.Textbox(label="Texto completo traducido")
|
| 43 |
+
|
| 44 |
sumbtn.click(fn = traducir_resumir, inputs = text, outputs = output1)
|
| 45 |
tradbtn.click(fn = traducir, inputs = text, outputs = output2)
|
| 46 |
# demo = gr.Interface(
|