Spaces:
Running
Running
Add new CC embeddings
Browse files- .gitattributes +1 -0
- static/CC_val_urls.txt +0 -0
- static/features/{CC_val_embeddings.npy → CC_embeddings.npy} +2 -2
- text2image.py +2 -2
.gitattributes
CHANGED
|
@@ -15,3 +15,4 @@
|
|
| 15 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 16 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 17 |
*.npy filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 15 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 16 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 17 |
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
static/CC_urls.txt filter=lfs diff=lfs merge=lfs -text
|
static/CC_val_urls.txt
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
static/features/{CC_val_embeddings.npy → CC_embeddings.npy}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1b3673a79725593e629f225f337cb5bbcea0285ecfffabf0109114adcf394e9
|
| 3 |
+
size 301871232
|
text2image.py
CHANGED
|
@@ -69,13 +69,13 @@ def get_image_features(dataset_name):
|
|
| 69 |
if dataset_name == "Unsplash":
|
| 70 |
return jnp.load("static/features/features.npy")
|
| 71 |
else:
|
| 72 |
-
return jnp.load("static/features/
|
| 73 |
|
| 74 |
|
| 75 |
@st.cache()
|
| 76 |
def load_urls(dataset_name):
|
| 77 |
if dataset_name == "CC":
|
| 78 |
-
with open("static/
|
| 79 |
urls = [l.strip() for l in fp.readlines()]
|
| 80 |
return urls
|
| 81 |
else:
|
|
|
|
| 69 |
if dataset_name == "Unsplash":
|
| 70 |
return jnp.load("static/features/features.npy")
|
| 71 |
else:
|
| 72 |
+
return jnp.load("static/features/CC_embeddings.npy")
|
| 73 |
|
| 74 |
|
| 75 |
@st.cache()
|
| 76 |
def load_urls(dataset_name):
|
| 77 |
if dataset_name == "CC":
|
| 78 |
+
with open("static/CC_urls.txt") as fp:
|
| 79 |
urls = [l.strip() for l in fp.readlines()]
|
| 80 |
return urls
|
| 81 |
else:
|