Spaces:
Sleeping
Sleeping
arman-aminian
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
from transformers import AutoModel, AutoTokenizer
|
6 |
|
7 |
text_tokenizer = AutoTokenizer.from_pretrained('arman-aminian/clip-text-farsi')
|
8 |
-
text_encoder = AutoModel.from_pretrained('arman-aminian/clip-
|
9 |
image_embeddings = torch.load('image_embeddings.pt')
|
10 |
image_links = np.load('image_links (1).npy', allow_pickle=True)
|
11 |
|
|
|
5 |
from transformers import AutoModel, AutoTokenizer
|
6 |
|
7 |
text_tokenizer = AutoTokenizer.from_pretrained('arman-aminian/clip-text-farsi')
|
8 |
+
text_encoder = AutoModel.from_pretrained('arman-aminian/clip-text-farsi').eval()
|
9 |
image_embeddings = torch.load('image_embeddings.pt')
|
10 |
image_links = np.load('image_links (1).npy', allow_pickle=True)
|
11 |
|