Update README.md
Browse files
README.md
CHANGED
@@ -52,9 +52,9 @@ To use this model with images, you’ll need the necessary components: the `ViTI
|
|
52 |
from transformers import VisionEncoderDecoderModel, ViTImageProcessor, BartTokenizer
|
53 |
|
54 |
# Load model, processor, and tokenizer
|
55 |
-
model = VisionEncoderDecoderModel.from_pretrained("
|
56 |
-
image_processor = ViTImageProcessor.from_pretrained("
|
57 |
-
tokenizer = BartTokenizer.from_pretrained("
|
58 |
```
|
59 |
|
60 |
## Inference Example
|
@@ -62,15 +62,6 @@ tokenizer = BartTokenizer.from_pretrained("BlackEyesBrownDragon/Dua-Vision-Base"
|
|
62 |
Here's a sample usage for generating captions for an image:
|
63 |
|
64 |
```python
|
65 |
-
from PIL import Image
|
66 |
-
import requests
|
67 |
-
from transformers import VisionEncoderDecoderModel, ViTImageProcessor, BartTokenizer
|
68 |
-
|
69 |
-
# Load model and processors
|
70 |
-
model = VisionEncoderDecoderModel.from_pretrained("BlackEyesBrownDragon/Dua-Vision-Base")
|
71 |
-
image_processor = ViTImageProcessor.from_pretrained("BlackEyesBrownDragon/Dua-Vision-Base")
|
72 |
-
tokenizer = BartTokenizer.from_pretrained("BlackEyesBrownDragon/Dua-Vision-Base")
|
73 |
-
|
74 |
# Load image and process
|
75 |
image_url = "https://example.com/image.jpg"
|
76 |
image = Image.open(requests.get(image_url, stream=True).raw)
|
|
|
52 |
from transformers import VisionEncoderDecoderModel, ViTImageProcessor, BartTokenizer
|
53 |
|
54 |
# Load model, processor, and tokenizer
|
55 |
+
model = VisionEncoderDecoderModel.from_pretrained("HV-Khurdula/Dua-Vision-Base")
|
56 |
+
image_processor = ViTImageProcessor.from_pretrained("HV-Khurdula/Dua-Vision-Base")
|
57 |
+
tokenizer = BartTokenizer.from_pretrained("HV-Khurdula/Dua-Vision-Base")
|
58 |
```
|
59 |
|
60 |
## Inference Example
|
|
|
62 |
Here's a sample usage for generating captions for an image:
|
63 |
|
64 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
# Load image and process
|
66 |
image_url = "https://example.com/image.jpg"
|
67 |
image = Image.open(requests.get(image_url, stream=True).raw)
|