chaoxu commited on
Commit
bb94c78
·
1 Parent(s): 16d5a10

install bug fix

Browse files
Files changed (1) hide show
  1. launch.py +5 -2
launch.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  import json
3
  import uuid
4
  import numpy as np
@@ -23,8 +24,10 @@ if not is_local_run:
23
  zip_ref.extractall(os.getcwd())
24
 
25
 
26
- os.system(f"pip install {code_dir}/gradio_model3dcolor-0.0.1-py3-none-any.whl")
27
- os.system(f"pip install {code_dir}/gradio_model3dnormal-0.0.1-py3-none-any.whl")
 
 
28
  from gradio_model3dcolor import Model3DColor
29
  from gradio_model3dnormal import Model3DNormal
30
 
 
1
  import os
2
+ import sys
3
  import json
4
  import uuid
5
  import numpy as np
 
24
  zip_ref.extractall(os.getcwd())
25
 
26
 
27
+ def install(package):
28
+ subprocess.check_call([sys.executable, "-m", "pip", "install", package])
29
+ install(f"{code_dir}/gradio_model3dcolor-0.0.1-py3-none-any.whl")
30
+ install(f"{code_dir}/gradio_model3dnormal-0.0.1-py3-none-any.whl")
31
  from gradio_model3dcolor import Model3DColor
32
  from gradio_model3dnormal import Model3DNormal
33