xp3857 commited on
Commit
5a5ad3c
1 Parent(s): 59afa4a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -72,7 +72,7 @@ def ac():
72
  return(None,None)
73
  def cl_fac():
74
  return ""
75
- with gr.Blocks(css='css.css') as b:
76
  with gr.Row():
77
  put = gr.Textbox()
78
  btn1 = gr.Button()
@@ -90,11 +90,12 @@ def ac():
90
  fac_b = gr.Textbox(value="",visible=False)
91
  btn1.click(start,None,[t_state,t_switch])
92
  sta = t_state.change(end,t_state,t_switch,every=1)
93
- t_switch.change(clear,t_switch,t_switch, cancels=[sta])
94
- btn1.click(cl_fac,None,fac_b)
95
- btn1.click(im_fn,[put,fac_b,h],[out1,fac_b])
96
- out1.change(im_fn,[put,fac_b,h],[out2,fac_b])
97
- out2.change(im_fn,[put,fac_b,h],[out3,fac_b])
98
- out3.change(im_fn,[put,fac_b,h],[out4,fac_b])
 
99
  b.queue(concurrency_count=100).launch(show_api=False)
100
  ac()
 
72
  return(None,None)
73
  def cl_fac():
74
  return ""
75
+ with gr.Blocks() as b:
76
  with gr.Row():
77
  put = gr.Textbox()
78
  btn1 = gr.Button()
 
90
  fac_b = gr.Textbox(value="",visible=False)
91
  btn1.click(start,None,[t_state,t_switch])
92
  sta = t_state.change(end,t_state,t_switch,every=1)
93
+ b1=btn1.click(cl_fac,None,fac_b)
94
+ b2=btn1.click(im_fn,[put,fac_b,h],[out1,fac_b])
95
+ b3=out1.change(im_fn,[put,fac_b,h],[out2,fac_b])
96
+ b4=out2.change(im_fn,[put,fac_b,h],[out3,fac_b])
97
+ b5=out3.change(im_fn,[put,fac_b,h],[out4,fac_b])
98
+ t_switch.change(clear,t_switch,t_switch, cancels=[sta,b1,b2,b3,b4,b5])
99
+
100
  b.queue(concurrency_count=100).launch(show_api=False)
101
  ac()