nateraw commited on
Commit
b3a4bd4
1 Parent(s): 25b2e77

Update status_checker.py

Browse files
Files changed (1) hide show
  1. 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("Waiting to find output_file to check if script is done running")
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
- if not output_file.exists():
40
- print("Didnt find output file on init, so starting thread to watch for it!")
41
  thread = Thread(target=status_checker, daemon=True)
42
  thread.start()
 
43
 
44
- demo.launch()
 
 
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()