Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,7 @@ def ac():
|
|
86 |
t_state=gr.Number()
|
87 |
t_switch=gr.Textbox(value=0)
|
88 |
def clear_all():
|
89 |
-
return "",None,None,None,None,None,None,
|
90 |
fac_b = gr.Textbox(value="",visible=False)
|
91 |
btn1.click(cl_fac,None,[fac_b,message])
|
92 |
b1=btn1.click(start,None,[t_state,t_switch])
|
@@ -95,7 +95,7 @@ def ac():
|
|
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 |
-
swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5])
|
99 |
-
btn2.click(clear_all, None,[fac_b,put,out1,out2,out3,out4,t_state,t_switch],cancels=[b1,sta,b2,b3,b4,b5])
|
100 |
b.queue(concurrency_count=100).launch(show_api=False)
|
101 |
ac()
|
|
|
86 |
t_state=gr.Number()
|
87 |
t_switch=gr.Textbox(value=0)
|
88 |
def clear_all():
|
89 |
+
return "",None,None,None,None,None,None,0
|
90 |
fac_b = gr.Textbox(value="",visible=False)
|
91 |
btn1.click(cl_fac,None,[fac_b,message])
|
92 |
b1=btn1.click(start,None,[t_state,t_switch])
|
|
|
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 |
+
swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5],show_progress=False)
|
99 |
+
btn2.click(clear_all, None,[fac_b,put,out1,out2,out3,out4,t_state,t_switch],cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
|
100 |
b.queue(concurrency_count=100).launch(show_api=False)
|
101 |
ac()
|