xp3857 commited on
Commit
be9f5b3
1 Parent(s): e3acd09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -56,7 +56,7 @@ loading=("""
56
  width: 13px;
57
  height: 13px;
58
  border-radius: 50%;
59
- background: #fff;
60
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
61
  }
62
  .lds-ellipsis div:nth-child(1) {
@@ -159,7 +159,7 @@ def ac():
159
  t_state=gr.Number()
160
  t_switch=gr.Textbox(value=0)
161
  def clear_all():
162
- return "",None,None,None,None,None,None,1
163
  fac_b = gr.Textbox(value="",visible=False)
164
 
165
  def noth():
@@ -171,9 +171,10 @@ def ac():
171
  b2=btn1.click(im_fn,[put,fac_b,h],[out1,fac_b], show_progress=False)
172
  b3=out1.change(im_fn,[put,fac_b,h],[out2,fac_b], show_progress=False)
173
  b4=out2.change(im_fn,[put,fac_b,h],[out3,fac_b], show_progress=False)
174
- b5=out3.change(im_fn,[put,fac_b,h],[out4,fac_b], show_progress=False)
 
175
  swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5],show_progress=False)
176
- btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
177
- 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)
178
  b.queue(concurrency_count=100).launch(show_api=False)
179
  ac()
 
56
  width: 13px;
57
  height: 13px;
58
  border-radius: 50%;
59
+ background: blue;
60
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
61
  }
62
  .lds-ellipsis div:nth-child(1) {
 
159
  t_state=gr.Number()
160
  t_switch=gr.Textbox(value=0)
161
  def clear_all():
162
+ return "",None,None,None,None,None,None,1,gr.HTML.update("<div></div>")
163
  fac_b = gr.Textbox(value="",visible=False)
164
 
165
  def noth():
 
171
  b2=btn1.click(im_fn,[put,fac_b,h],[out1,fac_b], show_progress=False)
172
  b3=out1.change(im_fn,[put,fac_b,h],[out2,fac_b], show_progress=False)
173
  b4=out2.change(im_fn,[put,fac_b,h],[out3,fac_b], show_progress=False)
174
+ b5=out3.change(im_fn,[put,fac_b,h],[out4,fac_b], show_progress=False)
175
+ b6=out4.change(noth,None,message, show_progress=False)
176
  swi=t_switch.change(clear,None,[t_switch,fac_b], cancels=[sta,b2,b3,b4,b5],show_progress=False)
177
+ #btn2.click(noth,None,message,cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
178
+ btn2.click(clear_all, None,[fac_b,put,out1,out2,out3,out4,t_state,t_switch,message],cancels=[b1,sta,b2,b3,b4,b5,swi],show_progress=False)
179
  b.queue(concurrency_count=100).launch(show_api=False)
180
  ac()