Update README.md
Browse files
README.md
CHANGED
|
@@ -36,7 +36,7 @@ pip install transformers torch torchvision pillow
|
|
| 36 |
|
| 37 |
## 🔥 Usage
|
| 38 |
|
| 39 |
-
### Load the Model
|
| 40 |
|
| 41 |
```python
|
| 42 |
from transformers import AutoModelForCausalLM, AutoProcessor
|
|
@@ -45,8 +45,8 @@ import torch
|
|
| 45 |
|
| 46 |
# Load the model and processor
|
| 47 |
model_name = "Spec-Vision-V1"
|
| 48 |
-
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 49 |
-
processor = AutoProcessor.from_pretrained(model_name)
|
| 50 |
|
| 51 |
# Load an example image
|
| 52 |
image = Image.open("example.jpg")
|
|
|
|
| 36 |
|
| 37 |
## 🔥 Usage
|
| 38 |
|
| 39 |
+
### 📥 Load the Model
|
| 40 |
|
| 41 |
```python
|
| 42 |
from transformers import AutoModelForCausalLM, AutoProcessor
|
|
|
|
| 45 |
|
| 46 |
# Load the model and processor
|
| 47 |
model_name = "Spec-Vision-V1"
|
| 48 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
|
| 49 |
+
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
| 50 |
|
| 51 |
# Load an example image
|
| 52 |
image = Image.open("example.jpg")
|