Update README.md
Browse files
README.md
CHANGED
|
@@ -34,12 +34,14 @@ This model is designed for **research purposes**, particularly in **medical visi
|
|
| 34 |
## 🚀 How to Use
|
| 35 |
|
| 36 |
```python
|
| 37 |
-
from transformers import AutoProcessor, AutoModelForVision2Seq
|
| 38 |
import torch
|
| 39 |
from PIL import Image
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
image = Image.open("example.jpg").convert("RGB")
|
| 45 |
prompt = "Return bounding boxes for each polyp in the image and the total count."
|
|
|
|
| 34 |
## 🚀 How to Use
|
| 35 |
|
| 36 |
```python
|
|
|
|
| 37 |
import torch
|
| 38 |
from PIL import Image
|
| 39 |
|
| 40 |
+
from peft import PeftModel
|
| 41 |
+
from transformers import AutoModelForCausalLM
|
| 42 |
+
|
| 43 |
+
base_model = AutoModelForCausalLM.from_pretrained("/home/sushant/.cache/modelscope/hub/Qwen/Qwen2___5-VL-7B-Instruct")
|
| 44 |
+
model = PeftModel.from_pretrained(base_model, "SimulaMet/PointDetectCount-Qwen2.5-VL-7B-LoRA")
|
| 45 |
|
| 46 |
image = Image.open("example.jpg").convert("RGB")
|
| 47 |
prompt = "Return bounding boxes for each polyp in the image and the total count."
|