chaoxu commited on
Commit
83c790d
·
1 Parent(s): dee50e0

install fix

Browse files
Files changed (1) hide show
  1. launch.py +7 -8
launch.py CHANGED
@@ -14,22 +14,21 @@ from huggingface_hub import snapshot_download
14
 
15
 
16
  is_local_run = os.path.exists("../SpaRP_API")
17
-
18
  code_dir = snapshot_download("sudo-ai/SpaRP_API", token=os.environ['HF_TOKEN']) if not is_local_run else "../SpaRP_API"
19
 
 
 
 
 
 
 
 
20
  if not is_local_run:
21
  zip_file_path = f'{code_dir}/examples.zip'
22
  # Unzipping the file into the current directory
23
  with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
24
  zip_ref.extractall(os.getcwd())
25
 
26
-
27
- os.system(f"pip install --force-reinstall {code_dir}/gradio_model3dcolor-0.0.1-py3-none-any.whl")
28
- os.system(f"pip install --force-reinstall {code_dir}/gradio_model3dnormal-0.0.1-py3-none-any.whl")
29
-
30
- from gradio_model3dcolor import Model3DColor
31
- from gradio_model3dnormal import Model3DNormal
32
-
33
  with open(f'{code_dir}/api.json', 'r') as file:
34
  api_dict = json.load(file)
35
  SEGM_i_CALL = api_dict["SEGM_i_CALL"]
 
14
 
15
 
16
  is_local_run = os.path.exists("../SpaRP_API")
 
17
  code_dir = snapshot_download("sudo-ai/SpaRP_API", token=os.environ['HF_TOKEN']) if not is_local_run else "../SpaRP_API"
18
 
19
+ os.system(f"pip install {code_dir}/gradio_model3dcolor-0.0.1-py3-none-any.whl")
20
+ os.system(f"pip install {code_dir}/gradio_model3dnormal-0.0.1-py3-none-any.whl")
21
+
22
+ from gradio_model3dcolor import Model3DColor
23
+ from gradio_model3dnormal import Model3DNormal
24
+
25
+
26
  if not is_local_run:
27
  zip_file_path = f'{code_dir}/examples.zip'
28
  # Unzipping the file into the current directory
29
  with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
30
  zip_ref.extractall(os.getcwd())
31
 
 
 
 
 
 
 
 
32
  with open(f'{code_dir}/api.json', 'r') as file:
33
  api_dict = json.load(file)
34
  SEGM_i_CALL = api_dict["SEGM_i_CALL"]