pierreguillou
commited on
Commit
•
429935b
1
Parent(s):
e39bab0
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
6 |
|
7 |
import os
|
8 |
import gradio as gr
|
|
|
1 |
+
# workaround: install old version of pytorch since detectron2 hasn't released packages for pytorch 1.9 (issue: https://github.com/facebookresearch/detectron2/issues/3158)
|
2 |
+
os.system('pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html')
|
3 |
+
|
4 |
+
# install detectron2 that matches pytorch 1.8
|
5 |
+
# See https://detectron2.readthedocs.io/tutorials/install.html for instructions
|
6 |
+
os.system('pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html')
|
7 |
|
8 |
import os
|
9 |
import gradio as gr
|