WILMU commited on
Commit
cb6fa70
1 Parent(s): af55ba7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -4
app.py CHANGED
@@ -17,15 +17,28 @@ def clear_input(input_text):
17
  # Limpia el input
18
  return ""
19
 
20
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  with gr.Row():
22
  input_text = gr.Textbox(label="Input")
23
  response_label = gr.Textbox(label="Respuesta")
24
 
25
  with gr.Row():
26
- clear_btn = gr.Button("Clear").style(background_color="red")
27
- btn1 = gr.Button("Español a Inglés").style(background_color="green")
28
- btn2 = gr.Button("Inglés a Español").style(background_color="green")
29
 
30
  clear_btn.click(fn=clear_input, inputs=input_text, outputs=input_text)
31
  btn1.click(fn=fun1, inputs=input_text, outputs=response_label)
 
17
  # Limpia el input
18
  return ""
19
 
20
+ with gr.Blocks(css="""
21
+ .gr-button {
22
+ background-color: green;
23
+ color: white;
24
+ }
25
+ .gr-textbox {
26
+ display: inline-block;
27
+ width: 48%;
28
+ margin-right: 4%;
29
+ }
30
+ .gr-textbox:last-child {
31
+ margin-right: 0;
32
+ }
33
+ """) as demo:
34
  with gr.Row():
35
  input_text = gr.Textbox(label="Input")
36
  response_label = gr.Textbox(label="Respuesta")
37
 
38
  with gr.Row():
39
+ clear_btn = gr.Button("Clear")
40
+ btn1 = gr.Button("Español a Inglés")
41
+ btn2 = gr.Button("Inglés a Español")
42
 
43
  clear_btn.click(fn=clear_input, inputs=input_text, outputs=input_text)
44
  btn1.click(fn=fun1, inputs=input_text, outputs=response_label)