Spaces:
Sleeping
Sleeping
Daniel Varga
commited on
Commit
·
11ef816
1
Parent(s):
4ad9668
dataset fix
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import clip
|
|
5 |
import torch
|
6 |
|
7 |
|
8 |
-
data = pickle.load(open("
|
9 |
embeddings = data["embeddings"]
|
10 |
image_features = torch.Tensor(embeddings)
|
11 |
image_features /= image_features.norm(dim=-1, keepdim=True)
|
@@ -14,7 +14,6 @@ image_features /= image_features.norm(dim=-1, keepdim=True)
|
|
14 |
n, d = embeddings.shape
|
15 |
|
16 |
filenames = data["filenames"]
|
17 |
-
thumbs = data["thumbs"]
|
18 |
|
19 |
base_url = "https://static.renyi.hu/ai-shared/daniel/sameenergy/index/"
|
20 |
urls = [base_url + filename for filename in filenames]
|
|
|
5 |
import torch
|
6 |
|
7 |
|
8 |
+
data = pickle.load(open("embeddings_nothumb.pkl", "rb"))
|
9 |
embeddings = data["embeddings"]
|
10 |
image_features = torch.Tensor(embeddings)
|
11 |
image_features /= image_features.norm(dim=-1, keepdim=True)
|
|
|
14 |
n, d = embeddings.shape
|
15 |
|
16 |
filenames = data["filenames"]
|
|
|
17 |
|
18 |
base_url = "https://static.renyi.hu/ai-shared/daniel/sameenergy/index/"
|
19 |
urls = [base_url + filename for filename in filenames]
|