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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -27,14 +27,15 @@ def greet(a, b, c):
27
  u.create()
28
  return 1
29
 
30
- demo = gr.Interface(fn=greet, inputs=["textbox", "button"], outputs="text")
31
- with gr.Blocks():
 
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()
 
27
  u.create()
28
  return 1
29
 
30
+ # demo = gr.Interface(fn=greet, inputs=["textbox", "button"], outputs="text")
31
+ demo = gr.Blocks():
32
+ with demo:
33
  p = gr.Textbox()
34
  f = gr.Textbox()
 
35
  with gr.Row():
36
  btn = gr.Button("insert")
37
  btn2 = gr.Button("query")
38
+ n = gr.Textbox()
39
  btn.click(greet, inputs=[p, f, gr.Number(value=0, visible=False)], outputs=[n])
40
  btn2.click(greet, inputs=[p, f, gr.Number(value=1, visible=False)], outputs=[n])
41
  # demo.launch()