Update README.md
Browse files
README.md
CHANGED
|
@@ -21,11 +21,10 @@ Works very fast on CPU.
|
|
| 21 |
|
| 22 |
```python
|
| 23 |
from transformers import AutoTokenizer, AutoImageProcessor, VisionEncoderDecoderModel
|
| 24 |
-
import requests,
|
| 25 |
from PIL import Image
|
| 26 |
|
| 27 |
model_path = "cnmoro/mini-image-captioning"
|
| 28 |
-
device = torch.device("cpu")
|
| 29 |
|
| 30 |
# load the image captioning model and corresponding tokenizer and image processor
|
| 31 |
model = VisionEncoderDecoderModel.from_pretrained(model_path)
|
|
|
|
| 21 |
|
| 22 |
```python
|
| 23 |
from transformers import AutoTokenizer, AutoImageProcessor, VisionEncoderDecoderModel
|
| 24 |
+
import requests, time
|
| 25 |
from PIL import Image
|
| 26 |
|
| 27 |
model_path = "cnmoro/mini-image-captioning"
|
|
|
|
| 28 |
|
| 29 |
# load the image captioning model and corresponding tokenizer and image processor
|
| 30 |
model = VisionEncoderDecoderModel.from_pretrained(model_path)
|