shouryap commited on
Commit
fec00bb
·
1 Parent(s): 9da1be6
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,11 +7,11 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
7
 
8
  # model_name="IDEA-Research/grounding-dino-base"
9
  # model_name="google/owlv2-base-patch16-ensemble"
10
- # owl_model = Owlv2ForObjectDetection.from_pretrained("IDEA-Research/grounding-dino-base").to("cuda")
11
- # owl_processor = Owlv2Processor.from_pretrained("IDEA-Research/grounding-dino-base")
12
 
13
- owl_processor = AutoProcessor.from_pretrained("IDEA-Research/grounding-dino-base")
14
- owl_model = AutoModelForZeroShotObjectDetection.from_pretrained("IDEA-Research/grounding-dino-base").to("cuda")
15
  @spaces.GPU
16
  def infer(img, text_queries, score_threshold, model="owl"):
17
  model="owl"
 
7
 
8
  # model_name="IDEA-Research/grounding-dino-base"
9
  # model_name="google/owlv2-base-patch16-ensemble"
10
+ owl_model = Owlv2ForObjectDetection.from_pretrained("IDEA-Research/grounding-dino-base").to("cuda")
11
+ owl_processor = Owlv2Processor.from_pretrained("IDEA-Research/grounding-dino-base")
12
 
13
+ # owl_processor = AutoProcessor.from_pretrained("IDEA-Research/grounding-dino-base")
14
+ # owl_model = AutoModelForZeroShotObjectDetection.from_pretrained("IDEA-Research/grounding-dino-base").to("cuda")
15
  @spaces.GPU
16
  def infer(img, text_queries, score_threshold, model="owl"):
17
  model="owl"