Update validate.py
Browse files- validate.py +13 -11
validate.py
CHANGED
@@ -1,14 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
o=os.environ['P']
|
4 |
-
def
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
with gr.
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
o=os.environ['P']
|
4 |
+
def main()
|
5 |
+
def checkp(p):
|
6 |
+
if p == o:
|
7 |
+
os.system('python app.py')
|
8 |
+
elif p != o:
|
9 |
+
pass
|
10 |
+
with gr.Blocks() as validate:
|
11 |
+
with gr.Row():
|
12 |
+
pass_box=gr.Textbox()
|
13 |
+
pass_btn=gr.Button()
|
14 |
+
pass_btn.click(checkp,pass_box,None)
|
15 |
+
validate.launch()
|
16 |
+
main()
|