fix cpu example
#6
by
devneko
- opened
README.md
CHANGED
@@ -67,9 +67,9 @@ For code examples, we refer to the [documentation](https://huggingface.co/docs/t
|
|
67 |
```python
|
68 |
import requests
|
69 |
from PIL import Image
|
70 |
-
from transformers import
|
71 |
|
72 |
-
processor =
|
73 |
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b")
|
74 |
|
75 |
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|
|
|
67 |
```python
|
68 |
import requests
|
69 |
from PIL import Image
|
70 |
+
from transformers import Blip2Processor, Blip2ForConditionalGeneration
|
71 |
|
72 |
+
processor = Blip2Processor.from_pretrained("Salesforce/blip2-opt-2.7b")
|
73 |
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b")
|
74 |
|
75 |
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
|