npc0 commited on
Commit
9a9d27e
·
verified ·
1 Parent(s): 9a55a44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -32,9 +32,10 @@ with gr.Blocks():
32
  p = gr.Textbox()
33
  f = gr.Textbox()
34
  n = gr.Textbox()
35
- btn = gr.Button(value="insert")
36
- btn.click(greet, inputs=[p, f, 0], outputs=[n])
37
- btn2 = gr.Button(value="query")
38
- btn2.click(greet, inputs=[p, f, 1], outputs=[n])
 
39
  # demo.launch()
40
  demo.launch(auth=("username", "password"))
 
32
  p = gr.Textbox()
33
  f = gr.Textbox()
34
  n = gr.Textbox()
35
+ with gr.Row():
36
+ btn = gr.Button("insert")
37
+ btn2 = gr.Button("query")
38
+ btn.click(greet, inputs=[p, f, gr.Number(value=0, visible=False)], outputs=[n])
39
+ btn2.click(greet, inputs=[p, f, gr.Number(value=1, visible=False)], outputs=[n])
40
  # demo.launch()
41
  demo.launch(auth=("username", "password"))