Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
·
a289b9b
1
Parent(s):
ab37e4d
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
-
os.system('pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu102/torch1.9/index.html')
|
| 4 |
-
os.system("pip install git+https://github.com/openai/CLIP.git")
|
| 5 |
import gradio as gr
|
| 6 |
|
| 7 |
# clone and install Detic
|
|
@@ -35,6 +33,8 @@ from centernet.config import add_centernet_config
|
|
| 35 |
from detic.config import add_detic_config
|
| 36 |
from detic.modeling.utils import reset_cls_test
|
| 37 |
|
|
|
|
|
|
|
| 38 |
# Build the detector and download our pretrained weights
|
| 39 |
cfg = get_cfg()
|
| 40 |
add_centernet_config(cfg)
|
|
|
|
| 1 |
import os
|
| 2 |
import sys
|
|
|
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
# clone and install Detic
|
|
|
|
| 33 |
from detic.config import add_detic_config
|
| 34 |
from detic.modeling.utils import reset_cls_test
|
| 35 |
|
| 36 |
+
from PIL import Image
|
| 37 |
+
|
| 38 |
# Build the detector and download our pretrained weights
|
| 39 |
cfg = get_cfg()
|
| 40 |
add_centernet_config(cfg)
|