dwb2023 commited on
Commit
d14c210
·
verified ·
1 Parent(s): 5cb1ec3

Update model_utils.py

Browse files

add GroundingDinoForObjectDetection

Files changed (1) hide show
  1. model_utils.py +2 -1
model_utils.py CHANGED
@@ -1,7 +1,7 @@
1
  import subprocess
2
  import os
3
  import torch
4
- from transformers import BitsAndBytesConfig, AutoConfig, AutoModelForCausalLM, LlavaNextForConditionalGeneration, LlavaForConditionalGeneration, PaliGemmaForConditionalGeneration, Idefics2ForConditionalGeneration, Owlv2ForObjectDetection
5
  import spaces
6
 
7
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
@@ -19,6 +19,7 @@ ARCHITECTURE_MAP = {
19
  "PaliGemmaForConditionalGeneration": PaliGemmaForConditionalGeneration,
20
  "Idefics2ForConditionalGeneration": Idefics2ForConditionalGeneration,
21
  "Owlv2ForObjectDetection": Owlv2ForObjectDetection,
 
22
  "AutoModelForCausalLM": AutoModelForCausalLM
23
  }
24
 
 
1
  import subprocess
2
  import os
3
  import torch
4
+ from transformers import BitsAndBytesConfig, AutoConfig, AutoModelForCausalLM, LlavaNextForConditionalGeneration, LlavaForConditionalGeneration, PaliGemmaForConditionalGeneration, Idefics2ForConditionalGeneration, Owlv2ForObjectDetection, GroundingDinoForObjectDetection
5
  import spaces
6
 
7
  os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
 
19
  "PaliGemmaForConditionalGeneration": PaliGemmaForConditionalGeneration,
20
  "Idefics2ForConditionalGeneration": Idefics2ForConditionalGeneration,
21
  "Owlv2ForObjectDetection": Owlv2ForObjectDetection,
22
+ "GroundingDinoForObjectDetection", GroundingDinoForObjectDetection,
23
  "AutoModelForCausalLM": AutoModelForCausalLM
24
  }
25