Create validate.py
Browse files- 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
|