import gradio as gr import os o=os.environ['P'] def checkp(p): if p == o: os.system('python app.py') elif p != o: pass with gr.Blocks() as validate: with gr.Row(): pass_box=gr.Textbox() pass_btn=gr.Button() pass_btn.click(checkp,pass_box,None) validate.launch()