xp3857 commited on
Commit
e3acd09
1 Parent(s): 96391a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -46,7 +46,7 @@ loading=("""
46
  position: relative;
47
  width: 80px;
48
  height: 80px;
49
- z-index:199999;
50
  }
51
  .lds-ellipsis div {
52
  position: absolute;
@@ -119,7 +119,7 @@ def ac():
119
  ts = stamp + 120
120
  ti = time.time()
121
  if ti > ts and stamp != 0:
122
- return gr.update(value=1),gr.HTML.update(f"{m_out}")
123
  else:
124
  return gr.update(value=0),None
125
  def im_fn(put,fac="",h=None):
@@ -145,6 +145,8 @@ def ac():
145
  btn1 = gr.Button("Run")
146
  btn2 = gr.Button("Clear")
147
  message=gr.HTML("<div></div>")
 
 
148
  with gr.Row():
149
  out1 = gr.Image()
150
  out2 = gr.Image()
@@ -165,7 +167,7 @@ def ac():
165
  #a1=btn1.click(noth,None,btn1,every=1)
166
  btn1.click(cl_fac,None,[fac_b,message],show_progress=False)
167
  b1=btn1.click(start,None,[t_state,t_switch],show_progress=False)
168
- sta = t_state.change(end,t_state,[t_switch,message],every=1,show_progress=False)
169
  b2=btn1.click(im_fn,[put,fac_b,h],[out1,fac_b], show_progress=False)
170
  b3=out1.change(im_fn,[put,fac_b,h],[out2,fac_b], show_progress=False)
171
  b4=out2.change(im_fn,[put,fac_b,h],[out3,fac_b], show_progress=False)
 
46
  position: relative;
47
  width: 80px;
48
  height: 80px;
49
+
50
  }
51
  .lds-ellipsis div {
52
  position: absolute;
 
119
  ts = stamp + 120
120
  ti = time.time()
121
  if ti > ts and stamp != 0:
122
+ return gr.update(value=1),gr.HTML.update(f"{m_out}",visible=True)
123
  else:
124
  return gr.update(value=0),None
125
  def im_fn(put,fac="",h=None):
 
145
  btn1 = gr.Button("Run")
146
  btn2 = gr.Button("Clear")
147
  message=gr.HTML("<div></div>")
148
+ message2=gr.HTML("",visible=False)
149
+
150
  with gr.Row():
151
  out1 = gr.Image()
152
  out2 = gr.Image()
 
167
  #a1=btn1.click(noth,None,btn1,every=1)
168
  btn1.click(cl_fac,None,[fac_b,message],show_progress=False)
169
  b1=btn1.click(start,None,[t_state,t_switch],show_progress=False)
170
+ sta = t_state.change(end,t_state,[t_switch,message2],every=1,show_progress=False)
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)