Update app.py
Browse files
app.py
CHANGED
@@ -62,8 +62,7 @@ def ac():
|
|
62 |
print (rn)
|
63 |
return model(put),fac,1
|
64 |
elif int(fac_c)!=1:
|
65 |
-
|
66 |
-
return None,None,0
|
67 |
elif h != o:
|
68 |
return(None,"",0)
|
69 |
def cl_fac():
|
@@ -86,9 +85,12 @@ def ac():
|
|
86 |
fac_b = gr.Textbox(value="",visible=False)
|
87 |
fac_c = gr.Textbox(value=0)
|
88 |
fac_d = gr.Textbox(value=1)
|
89 |
-
|
90 |
|
91 |
-
|
|
|
|
|
|
|
|
|
92 |
b1=btn1.click(start,None,[t_state,t_switch])
|
93 |
sta = t_state.change(end,t_state,t_switch,every=1)
|
94 |
b2=btn1.click(im_fn,[put,fac_b,fac_d,h],[out1,fac_b,fac_c])
|
|
|
62 |
print (rn)
|
63 |
return model(put),fac,1
|
64 |
elif int(fac_c)!=1:
|
65 |
+
return None,"",0
|
|
|
66 |
elif h != o:
|
67 |
return(None,"",0)
|
68 |
def cl_fac():
|
|
|
85 |
fac_b = gr.Textbox(value="",visible=False)
|
86 |
fac_c = gr.Textbox(value=0)
|
87 |
fac_d = gr.Textbox(value=1)
|
|
|
88 |
|
89 |
+
|
90 |
+
b3=out1.change(im_fn,[put,fac_b,fac_c,h],[out2,fac_b,fac_c])
|
91 |
+
b4=out2.change(im_fn,[put,fac_b,fac_c,h],[out3,fac_b,fac_c])
|
92 |
+
b5=out3.change(im_fn,[put,fac_b,fac_c,h],[out4,fac_b,fac_c])
|
93 |
+
b0=btn1.click(cl_fac,None,[fac_b,fac_c,out1,out2,out3,out4],cancels=[b3,b4,b5],show_progress=False)
|
94 |
b1=btn1.click(start,None,[t_state,t_switch])
|
95 |
sta = t_state.change(end,t_state,t_switch,every=1)
|
96 |
b2=btn1.click(im_fn,[put,fac_b,fac_d,h],[out1,fac_b,fac_c])
|