jadechoghari commited on
Commit
82a974d
·
verified ·
1 Parent(s): 85e57a3

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +2 -2
inference.py CHANGED
@@ -42,8 +42,8 @@ def generate_mask_for_feature(coor, raw_w, raw_h, mask=None):
42
 
43
  return coor_mask
44
 
45
-
46
- def infer_single_prompt(image_path, prompt, model_path, region=None, model_name="ferret_gemma", conv_mode="ferret_gemma_instruct"):
47
  img = Image.open(image_path).convert('RGB')
48
 
49
  # this loads the model, image processor and tokenizer
 
42
 
43
  return coor_mask
44
 
45
+ ## choose a conv_mode based on the model type from conversation.py
46
+ def infer_single_prompt(image_path, prompt, model_path, region=None, model_name="ferret_llama", conv_mode="ferret_llama_3"):
47
  img = Image.open(image_path).convert('RGB')
48
 
49
  # this loads the model, image processor and tokenizer