PDG commited on
Commit
458c5d4
·
1 Parent(s): beaa2ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -6,11 +6,12 @@ from torchvision import models, transforms
6
  from PIL import Image
7
 
8
  # -- get torch and cuda version
9
- TORCH_VERSION = ".".join(torch.__version__.split(".")[:2])
10
- CUDA_VERSION = torch.__version__.split("+")[-1]
11
 
12
  # -- install pre-build detectron2
13
- os.system(pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/{CUDA_VERSION}/{TORCH_VERSION}/index.html)
 
14
 
15
  import detectron2
16
  from detectron2.utils.logger import setup_logger # ????
 
6
  from PIL import Image
7
 
8
  # -- get torch and cuda version
9
+ #TORCH_VERSION = ".".join(torch.__version__.split(".")[:2])
10
+ #CUDA_VERSION = torch.__version__.split("+")[-1]
11
 
12
  # -- install pre-build detectron2
13
+ os.system(pip install pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html)
14
+ os.system(pip install pyyaml==5.1)
15
 
16
  import detectron2
17
  from detectron2.utils.logger import setup_logger # ????