Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
-
|
2 |
-
Thanks to Freddy Boulton (https://github.com/freddyaboulton) for helping with this.
|
3 |
-
"""
|
4 |
|
5 |
|
6 |
import pickle
|
@@ -20,8 +18,8 @@ with open("lsh.pickle", "rb") as handle:
|
|
20 |
loaded_lsh = pickle.load(handle)
|
21 |
|
22 |
# Load model for computing embeddings.
|
23 |
-
|
24 |
-
model_ckpt = "matteopilotto/vit-base-patch16-224-in21k-snacks"
|
25 |
model = AutoModel.from_pretrained(model_ckpt)
|
26 |
lsh_builder = BuildLSHTable(model)
|
27 |
lsh_builder.lsh = loaded_lsh
|
|
|
1 |
+
|
|
|
|
|
2 |
|
3 |
|
4 |
import pickle
|
|
|
18 |
loaded_lsh = pickle.load(handle)
|
19 |
|
20 |
# Load model for computing embeddings.
|
21 |
+
model_ckpt = "google/vit-base-patch16-224"
|
22 |
+
#model_ckpt = "matteopilotto/vit-base-patch16-224-in21k-snacks"
|
23 |
model = AutoModel.from_pretrained(model_ckpt)
|
24 |
lsh_builder = BuildLSHTable(model)
|
25 |
lsh_builder.lsh = loaded_lsh
|