Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from unilm.dit.object_detection.ditod import add_vit_config
|
| 2 |
import torch
|
| 3 |
import cv2
|
|
@@ -7,12 +13,7 @@ from detectron2.utils.visualizer import ColorMode, Visualizer
|
|
| 7 |
from detectron2.data import MetadataCatalog
|
| 8 |
from detectron2.engine import DefaultPredictor
|
| 9 |
import gradio as gr
|
| 10 |
-
import os
|
| 11 |
|
| 12 |
-
os.system('git clone https://github.com/facebookresearch/detectron2.git')
|
| 13 |
-
os.system('pip install -e detectron2')
|
| 14 |
-
import sys
|
| 15 |
-
sys.path.append("detectron2")
|
| 16 |
|
| 17 |
cfg = get_cfg()
|
| 18 |
add_vit_config(cfg)
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
os.system('git clone https://github.com/facebookresearch/detectron2.git')
|
| 3 |
+
os.system('pip install -e detectron2')
|
| 4 |
+
|
| 5 |
+
import sys
|
| 6 |
+
sys.path.append("detectron2")
|
| 7 |
from unilm.dit.object_detection.ditod import add_vit_config
|
| 8 |
import torch
|
| 9 |
import cv2
|
|
|
|
| 13 |
from detectron2.data import MetadataCatalog
|
| 14 |
from detectron2.engine import DefaultPredictor
|
| 15 |
import gradio as gr
|
|
|
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
cfg = get_cfg()
|
| 19 |
add_vit_config(cfg)
|