xp3857 commited on
Commit
c4e54fe
1 Parent(s): 60777f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -41,7 +41,7 @@ def ac():
41
  return v
42
  def start():
43
  stamp = time.time()
44
- return gr.update(value=stamp),gr.update(value=0),None,None,None,None
45
 
46
  def end(stamp):
47
  ts = stamp + 6
@@ -71,7 +71,7 @@ def ac():
71
  elif h != o:
72
  return(None,None)
73
  def cl_fac():
74
- return ""
75
  with gr.Blocks() as b:
76
  with gr.Row():
77
  put = gr.Textbox()
@@ -86,12 +86,11 @@ def ac():
86
  h=gr.Textbox("Q")
87
  t_state=gr.Number()
88
  t_switch=gr.Textbox(value=0)
89
-
90
  fac_b = gr.Textbox(value="",visible=False)
91
-
92
- btn1.click(start,None,[t_state,t_switch,out1,out2,out3,out4])
 
93
  sta = t_state.change(end,t_state,t_switch,every=1)
94
- b1=btn1.click(cl_fac,None,fac_b)
95
  b2=btn1.click(im_fn,[put,fac_b,h],[out1,fac_b])
96
  b3=out1.change(im_fn,[put,fac_b,h],[out2,fac_b])
97
  b4=out2.change(im_fn,[put,fac_b,h],[out3,fac_b])
 
41
  return v
42
  def start():
43
  stamp = time.time()
44
+ return gr.update(value=stamp),gr.update(value=0)
45
 
46
  def end(stamp):
47
  ts = stamp + 6
 
71
  elif h != o:
72
  return(None,None)
73
  def cl_fac():
74
+ return "",None,None,None,None
75
  with gr.Blocks() as b:
76
  with gr.Row():
77
  put = gr.Textbox()
 
86
  h=gr.Textbox("Q")
87
  t_state=gr.Number()
88
  t_switch=gr.Textbox(value=0)
 
89
  fac_b = gr.Textbox(value="",visible=False)
90
+
91
+ b0=btn1.click(cl_fac,None,[fac_b,out1,out2,out3,out4],show_progress=False)
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,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])