聂如 commited on
Commit
bff377e
Β·
1 Parent(s): e671e99

Add design file

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -177,6 +177,16 @@ class FileState:
177
 
178
  @spaces.GPU(duration=180)
179
  def local_get_reconstructed_scene(inputfiles, min_conf_thr, cam_size):
 
 
 
 
 
 
 
 
 
 
180
  outdir = tempfile.mkdtemp(suffix='_FLARE_gradio_demo')
181
  batch = load_images(inputfiles, size=image_size, verbose=not silent)
182
  images = [gt['img'] for gt in batch]
 
177
 
178
  @spaces.GPU(duration=180)
179
  def local_get_reconstructed_scene(inputfiles, min_conf_thr, cam_size):
180
+ import sys
181
+ import torch
182
+ pyt_version_str=torch.__version__.split("+")[0].replace(".", "")
183
+ version_str="".join([
184
+ f"py3{sys.version_info.minor}_cu",
185
+ torch.version.cuda.replace(".",""),
186
+ f"_pyt{pyt_version_str}"
187
+ ])
188
+ os.system('pip install iopath')
189
+ os.system(f"pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html")
190
  outdir = tempfile.mkdtemp(suffix='_FLARE_gradio_demo')
191
  batch = load_images(inputfiles, size=image_size, verbose=not silent)
192
  images = [gt['img'] for gt in batch]