Gengzigang
commited on
Commit
·
ecfb347
1
Parent(s):
b5d4148
fix typo
Browse files
README.md
CHANGED
|
@@ -57,16 +57,16 @@ with torch.no_grad(), torch.cuda.amp.autocast():
|
|
| 57 |
```
|
| 58 |
Retrieval
|
| 59 |
```python
|
|
|
|
|
|
|
|
|
|
| 60 |
from PIL import Image
|
| 61 |
-
from transformers import AutoModel, AutoConfig, AutoTokenizer
|
| 62 |
-
from transformers import CLIPImageProcessor
|
| 63 |
import torch
|
| 64 |
from llm2vec import LLM2Vec
|
| 65 |
-
import
|
| 66 |
-
|
| 67 |
-
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
| 68 |
|
| 69 |
-
processor = CLIPImageProcessor.from_pretrained("openai/
|
| 70 |
model_name_or_path = "microsoft/LLM2CLIP-Openai-B-16" # or /path/to/local/LLM2CLIP-Openai-B-16
|
| 71 |
model = AutoModel.from_pretrained(
|
| 72 |
model_name_or_path,
|
|
|
|
| 57 |
```
|
| 58 |
Retrieval
|
| 59 |
```python
|
| 60 |
+
import os
|
| 61 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
|
| 62 |
+
|
| 63 |
from PIL import Image
|
|
|
|
|
|
|
| 64 |
import torch
|
| 65 |
from llm2vec import LLM2Vec
|
| 66 |
+
from transformers import AutoModel, AutoConfig, AutoTokenizer
|
| 67 |
+
from transformers import CLIPImageProcessor
|
|
|
|
| 68 |
|
| 69 |
+
processor = CLIPImageProcessor.from_pretrained("openai/clip-vit-base-patch16")
|
| 70 |
model_name_or_path = "microsoft/LLM2CLIP-Openai-B-16" # or /path/to/local/LLM2CLIP-Openai-B-16
|
| 71 |
model = AutoModel.from_pretrained(
|
| 72 |
model_name_or_path,
|