heatingma commited on
Commit
b821f8f
·
verified ·
1 Parent(s): 064928a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -68,6 +68,19 @@ with gr.Blocks() as demo:
68
  outputs=None
69
  )
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  if __name__ == "__main__":
73
  demo.launch(debug = True)
 
68
  outputs=None
69
  )
70
 
71
+ import time
72
+ import subprocess
73
+
74
+ MAX_TIME = 10
75
+ cur_time = 0
76
+
77
+ while cur_time < MAX_TIME:
78
+ cur_time += 1
79
+ uninstall_cmd = ['pip', 'uninstall', '-y', 'ml4co-kit==0.0.1']
80
+ subprocess.run(uninstall_cmd)
81
+ install_cmd = ['pip', 'install', '--no-cache-dir', 'ml4co-kit']
82
+ subprocess.run(install_cmd)
83
+ time.sleep(1)
84
 
85
  if __name__ == "__main__":
86
  demo.launch(debug = True)