xp3857 commited on
Commit
8a37cd2
·
1 Parent(s): 602fc54

Create validate.py

Browse files
Files changed (1) hide show
  1. validate.py +11 -0
validate.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def checkp(p,o,r1,r2):
2
+ def check(p):
3
+ if p == o:
4
+ return gr.update(visible=False), gr.update(visible=True)
5
+ elif p != o:
6
+ return None, None
7
+ with gr.Row(visible=True) as no:
8
+ pass_box=gr.Textbox()
9
+ pass_btn=gr.Button()
10
+ pass_btn.click(check,[pass_box,o,r1,r2],[r1,r2])
11
+ return r1,r2