import gradio as gr | |
o=os.environ['P'] | |
def checkp(): | |
while True: | |
def check(p): | |
if p == o: | |
out = 1 | |
yield out | |
break | |
elif p != o: | |
out = 0 | |
pass | |
return out | |
with gr.Row(visible=True): | |
pass_box=gr.Textbox() | |
pass_btn=gr.Button() | |
pass_box1=gr.Textbox(value=0,visible=False,interactive=False) | |
pass_btn.click(check,[pass_box],[pass_box1]) | |
return pass_box1 |