muellerzr HF staff commited on
Commit
26cd3ca
1 Parent(s): 12c80c9
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -4,6 +4,7 @@ import subprocess
4
  import os
5
  from huggingface_hub import hf_hub_download
6
  import gradio as gr
 
7
 
8
  PORT = 3000
9
  HOST = "127.0.0.1"
@@ -21,8 +22,8 @@ def download_logs():
21
  subprocess.run("unzip aim_logs.zip")
22
 
23
  def run_aim():
24
- cmd = f"aim up --repo aim_logs --host {HOST} --port {PORT}"
25
- os.spawnl(os.P_DETACH, cmd)
26
 
27
  html = f"""
28
  <iframe
@@ -46,6 +47,7 @@ html = f"""
46
  def run():
47
  download_logs()
48
  run_aim()
 
49
 
50
  def main():
51
  demo = gr.Interface(
 
4
  import os
5
  from huggingface_hub import hf_hub_download
6
  import gradio as gr
7
+ import time
8
 
9
  PORT = 3000
10
  HOST = "127.0.0.1"
 
22
  subprocess.run("unzip aim_logs.zip")
23
 
24
  def run_aim():
25
+ cmd = f"aim up --repo aim_logs --host {HOST} --port {PORT}".split()
26
+ subprocess.Popen(cmd)
27
 
28
  html = f"""
29
  <iframe
 
47
  def run():
48
  download_logs()
49
  run_aim()
50
+ time.sleep(5)
51
 
52
  def main():
53
  demo = gr.Interface(