jadechoghari
commited on
Update inference.py
Browse files- 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="
|
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
|