PDG commited on
Commit
9a30e62
·
1 Parent(s): b6084e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
 
 
2
  import gradio as gr
3
  import torch
4
  from torchvision import models, transforms
@@ -9,7 +10,7 @@ TORCH_VERSION = ".".join(torch.__version__.split(".")[:2])
9
  CUDA_VERSION = torch.__version__.split("+")[-1]
10
 
11
  # -- install pre-build detectron2
12
- !python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/{CUDA_VERSION}/{TORCH_VERSION}/index.html
13
 
14
  import detectron2
15
  from detectron2.utils.logger import setup_logger # ????
 
1
 
2
+ import os
3
  import gradio as gr
4
  import torch
5
  from torchvision import models, transforms
 
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 # ????