Update status_checker.py
Browse files- status_checker.py +6 -4
status_checker.py
CHANGED
@@ -23,7 +23,7 @@ def process_is_complete():
|
|
23 |
return len(out) == 1
|
24 |
|
25 |
def status_checker():
|
26 |
-
print("
|
27 |
while True:
|
28 |
if process_is_complete():
|
29 |
print("Found it! Uploading assets to output dataset repo")
|
@@ -36,9 +36,11 @@ def status_checker():
|
|
36 |
with gr.Blocks() as demo:
|
37 |
gr.Markdown(Path('about.md').read_text())
|
38 |
|
39 |
-
|
40 |
-
|
41 |
thread = Thread(target=status_checker, daemon=True)
|
42 |
thread.start()
|
|
|
43 |
|
44 |
-
|
|
|
|
23 |
return len(out) == 1
|
24 |
|
25 |
def status_checker():
|
26 |
+
print("Watching PID of script to see if it is done running")
|
27 |
while True:
|
28 |
if process_is_complete():
|
29 |
print("Found it! Uploading assets to output dataset repo")
|
|
|
36 |
with gr.Blocks() as demo:
|
37 |
gr.Markdown(Path('about.md').read_text())
|
38 |
|
39 |
+
|
40 |
+
def main():
|
41 |
thread = Thread(target=status_checker, daemon=True)
|
42 |
thread.start()
|
43 |
+
demo.launch()
|
44 |
|
45 |
+
if __name__ == '__main__':
|
46 |
+
main()
|