Vo Minh Vu commited on
Commit
cdeaa4d
·
1 Parent(s): d1ad947
app.py CHANGED
@@ -23,6 +23,17 @@ from tsr.utils import remove_background, resize_foreground, to_gradio_3d_orienta
23
  # ------------------------------------------------------------
24
  # Install any local wheels (if needed)
25
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  # device
28
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
 
23
  # ------------------------------------------------------------
24
  # Install any local wheels (if needed)
25
 
26
+ import sys
27
+
28
+ # Install any local wheel files in the "wheels" directory
29
+ wheels_dir = os.path.join(os.path.dirname(__file__), "wheels")
30
+ if os.path.isdir(wheels_dir):
31
+ for file in os.listdir(wheels_dir):
32
+ if file.endswith(".whl"):
33
+ whl_path = os.path.join(wheels_dir, file)
34
+ subprocess.check_call([sys.executable, "-m", "pip", "install", whl_path])
35
+
36
+
37
 
38
  # device
39
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
requirements.txt CHANGED
@@ -1,6 +1,3 @@
1
- --find-links ./wheel
2
- torchmcubes-0.1.0-cp310-cp310-linux_x86_64.whl
3
-
4
  omegaconf
5
  Pillow
6
  einops
 
 
 
 
1
  omegaconf
2
  Pillow
3
  einops
{wheel → wheels}/torchmcubes-0.1.0-cp310-cp310-linux_x86_64.whl RENAMED
File without changes