Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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/
|
|
|
|
| 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 # ????
|