Elouarn commited on
Commit
f1abddd
·
verified ·
1 Parent(s): 82e2d15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -258,16 +258,16 @@ def handle_accuse_click(request: gr.Request):
258
  return output, win
259
 
260
  def accuse_btn(request: gr.Request):
261
- accuse_btn = gr.Button("Accuser")
262
 
263
  def handle_click():
264
  output, win = handle_accuse_click(request)
265
- accuse_btn.output = (output, gr.update(visible=False), gr.update(visible=False))
266
  if win:
267
- js = "setTimeout(function() { window.location.reload(); }, 3000);"
268
  else:
269
- js = ""
270
- return None, js
271
 
272
  accuse_btn.click(handle_click)
273
  return accuse_btn
 
258
  return output, win
259
 
260
  def accuse_btn(request: gr.Request):
261
+ accuse_btn = gr.Button("Accuser",js = "setTimeout(function() { window.location.reload(); }, 3000);")
262
 
263
  def handle_click():
264
  output, win = handle_accuse_click(request)
265
+ #accuse_btn.output = (output, gr.update(visible=False), gr.update(visible=False))
266
  if win:
267
+ accuse_btn=gr.Button(output)
268
  else:
269
+ accuse_btn=gr.Button(output)
270
+ return None
271
 
272
  accuse_btn.click(handle_click)
273
  return accuse_btn