Martin Tomov commited on
Commit
cd7cf5e
β€’
1 Parent(s): fa4ee23

pip install git+https://github.com/IDEA-Research/Grounded-Segment-Anything.git from notebook

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -11,6 +11,13 @@ except ImportError:
11
  os.system('pip install git+https://github.com/facebookresearch/segment-anything.git')
12
  from segment_anything import build_sam, SamPredictor
13
 
 
 
 
 
 
 
 
14
  import gradio as gr
15
  import json
16
  import numpy as np
 
11
  os.system('pip install git+https://github.com/facebookresearch/segment-anything.git')
12
  from segment_anything import build_sam, SamPredictor
13
 
14
+ try:
15
+ from GroundingDINO.groundingdino.util import box_ops
16
+ except ImportError:
17
+ import os
18
+ os.system('pip install git+https://github.com/IDEA-Research/Grounded-Segment-Anything.git')
19
+ from GroundingDINO.groundingdino.util import box_ops
20
+
21
  import gradio as gr
22
  import json
23
  import numpy as np